Chapter 06 — Collections: List, Set, Map
Part 1A — Learn Dart · Chapter 06 of 62 · 6 h
Chapter 06 — Collections: List, Set, Map
Level: beginner Estimated time: 6 h Prerequisites: Chapter 05 — Loops (
for,while,do while) What you will be able to do by the end: create, iterate over, and manipulateList,Set, andMapcollections, including nested collections similar to what an API returns, and build a complete game inventory.
06.0 — Chapter objectives
By the end of this chapter, you will be able to:
- understand what a collection is;
- store multiple values in a single variable;
- create a
List; - access the elements of a list;
- modify a list;
- add and remove elements;
- iterate over a list with
for; - iterate over a list with
for-in; - use
length,first,last,isEmpty, andisNotEmpty; - use
contains()andindexOf(); - create a
Set; - understand value uniqueness in a
Set; - perform unions, intersections, and differences;
- create a
Map; - understand the key/value principle;
- read, add, update, and remove a
Mapentry; - iterate over a
Map; - create nested collections;
- work with structures similar to those received from a JSON API;
- build a simple game inventory.
Comments
Comments are powered by GitHub Discussions
Sign in with GitHub to join the discussion