Appendix B. Defining classes and libraries

This appendix discusses building classes and using libraries and privacy.

B.1. Classes and interfaces

Dart is a class-based, object-orientated language with single inheritance and multiple interfaces. Dart has explicit classes and implicit interfaces: that is, a class definition implicitly defines an interface on its public properties and methods that other classes can implement.



In the initial release of Dart, there were explicit interfaces defined using the interface keyword. After feedback from Dart’s early adopters, it was discovered that because an abstract class definition also defines an interface, the interface keyword was redundant.


B.1.1. Defining classes

The class keyword is ...

Get Dart in Action now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.