Declare that a class provides a concrete implementation of an interface.
The implements keyword declares that a class conforms to the interface defined by one or more other classes. Every class in Dart implicitly defines an interface containing all of its instance members, so any class can be used as an interface.
Unlike extends, implements does not inherit any implementation. The implementing class must provide its own concrete implementation of every member declared in the interface. A class can implement multiple interfaces separated by commas.
Using implements is ideal when you want to guarantee that a class has a specific API shape without inheriting behavior. This is common in testing, where mock classes implement interfaces to provide test doubles.
class Printable {
String formatOutput() => '';
}
class Report implements Printable {
@override
String formatOutput() {
return 'Report: Q4 Results';
}
}