Chapter 8. Collections of richer classes
This chapter covers
- Working with collections
- Building type-safe, general-purpose classes with generics
- Overloading class operators
In the previous two chapters, we discussed how you can use classes and interfaces in your Dart applications and libraries. In this final chapter on classes, we’ll look at how to make classes richer and even more flexible and descriptive by using some of their advanced features.
We’ll start by using the built-in collection classes, such as List and Map, which allow you to manipulate lists of data. By using generic types, you can help make accessing your collections type-safe and benefit from additional validations from the type checker. You’ll use the indexer syntax to ...
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.