Loading topic
Intermediate · Mid: 14 chapters · 22 min read. States assumed prerequisites
Start readingList<int>, and nullable types such as int?.List<int>, and nullable types such as int?. A List<T> is an ordered collection of values of type T. Each value has a position called an index. Dart indexes lists from 0, so the first item is at index 0.Map<String, int>, and nullable types such as int?.List<int>, and basic null safety. A set is a collection that stores each value at most once. Unlike a list, a set does not use positions as its main way to access data.List<int>, and basic null safety. In Dart, null means that a value is absent. A nullable type is marked with ?, such as int? or List<String>?.List<int>, and null safety. It focuses on reading collection values without changing how a collection stores them.List<int>, and nullable types such as List<int>?. This chapter shows how to build collections from other collections and conditions without writing repeated add calls.List<int>, and null safety. It focuses on Iterable, Dart's interface for values that can be visited one at a time. Lists, sets, and many collection results implement Iterable.List<int>, and null safety. In Dart, collections differ not only by their type, but also by whether you can change them. The main choices are growable, fixed-length, const, and unmodifiable collections.List, Map, and Set. It focuses on copying collections without accidentally sharing the collection you meant to duplicate.Set or act as keys in a Map.List, Map, Set, and basic iteration. You should also be familiar with null safety and importing Dart libraries.List<int>, and nullable types such as int?. This chapter focuses on choosing between List, Map, and Set, rather than repeating every operation they support.