annotate_
                  Annotate overridden members.
Details
#DO annotate overridden methods and fields.
This practice improves code readability and helps protect against unintentionally overriding superclass members.
BAD:
class Cat {
  int get lives => 9;
}
class Lucky extends Cat {
  final int lives = 14;
}
GOOD:
abstract class Dog {
  String get breed;
  void bark() {}
}
class Husky extends Dog {
  @override
  final String breed = 'Husky';
  @override
  void bark() {}
}
Enable
#
                  To enable the annotate_overrides rule, add annotate_overrides under
                  linter > rules in your analysis_options.yaml
                   file:
                
linter:
  rules:
    - annotate_overrides
                  If you're instead using the YAML map syntax to configure linter rules,
                  add annotate_overrides: true under linter > rules:
                
linter:
  rules:
    annotate_overrides: true
Unless stated otherwise, the documentation on this site reflects Dart 3.9.2. Report an issue.