0PricingLogin
Dart Academy · Lesson

Implicit Interfaces and implements

Treat any class as an interface.

Every Class Is an Interface

In Dart, each class quietly defines an implicit interface: the full set of its public methods and getters that others can promise to provide.

implements vs extends

With extends you inherit code. With implements you only adopt the shape and must rewrite every member yourself.

class Robot implements Greeter {}

All lessons in this course

  1. Abstract Classes and Abstract Methods
  2. Implicit Interfaces and implements
  3. Polymorphism Through Shared Types
  4. Composition Over Inheritance
← Back to Dart Academy