EN_raw_non_abstract_class_inherits_abstract_member

  •                   Toolschevron_right
    
  •                   Diagnosticschevron_right
    
  •                   non_abstract_class_inherits_abstract_member
    
                non_abstract_class_inherits_abstract_member
    
                  Details about the 'non_abstract_class_inherits_abstract_member' diagnostic produced by the Dart analyzer.
    
                  more_vert
    
  •                       copyCopy link
    
  •                       bug_reportReport issue
    

Missing concrete implementation of '{0}'.

Missing concrete implementations of '{0}' and '{1}'.

Missing concrete implementations of '{0}', '{1}', '{2}', '{3}', and {4} more.

Missing concrete implementations of '{0}', '{1}', '{2}', and '{3}'.

Missing concrete implementations of '{0}', '{1}', and '{2}'.

              Description

              #

              The analyzer produces this diagnostic when a concrete class inherits one or
              more abstract members, and doesn't provide or inherit an implementation for
              at least one of those abstract members.

              Example

              #

              The following code produces this diagnostic because the class `B` doesn't
              have a concrete implementation of `m`:

                dart
abstract class A {
  void m();
}
​
class B extends A {}
                content_copy

              Common fixes

              #

              If the subclass can provide a concrete implementation for some or all of
              the abstract inherited members, then add the concrete implementations:

                dart
abstract class A {
  void m();
}
​
class B extends A {
  @override
  void m() {}
}
                content_copy

              If there is a mixin that provides an implementation of the inherited
              methods, then apply the mixin to the subclass:

                dart
abstract class A {
  void m();
}
​
class B extends A with M {}
​
mixin M {
  void m() {}
}
                content_copy

              If the subclass can't provide a concrete implementation for all of the
              abstract inherited members, then mark the subclass as being abstract:

                dart
abstract class A {
  void m();
}
​
abstract class B extends A {}
                content_copy

Was this page's content helpful?

                    thumb_up
                    thumb_down

                Unless stated otherwise, the documentation on this site reflects Dart 3.13.3. Report an issue.