Chapter 4: Dart Classes and Constructs

In this chapter, we will look at object-oriented programming (OOP) and how it is supported by the Dart language. We will start by looking at the core principles of OOP with relation to the Dart language, and then explore how to use OOP within Dart.

We will then take a deeper look at class definitions and how instances of a class are created, including an exploration of the constructor types available, which forms a key part of the way Flutter apps are coded. Additionally, we will look at how we store our code in files, and how to import code from other files.

Finally, we will look at some key Dart topics that are used throughout Flutter—generics and asynchronous programming. These will help with your understanding ...

Get Flutter for Beginners - Second Edition 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.