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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.