Chapter 6. Constructing classes and interfaces

This chapter covers

  • Defining classes
  • Dart’s implied interfaces
  • Constructing classes

Dart is a single-inheritance, class-based, object-oriented language. It has many similarities to Java and C# in terms of its class and interface mechanisms. In this chapter, we’ll look at the features of Dart’s classes that enable you to design flexible libraries of classes and interfaces that promote best practices, such as coding against interfaces and providing named constructors for different, specific purposes.

We’ll deal with the different ways to construct classes, including what appears to be the ability to construct an instance of an abstract class, rather than a specific implementation class, and why ...

Get Dart in Action now with O’Reilly online learning.

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