O'Reilly logo

Mastering Dart by Sergey Akopkokhyants

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The collection classes

The collection framework has the following classes for all occasions:

  • List: This is an ordered collection that supports indexed access to elements and allows duplicate elements
  • Set: This is a collection of elements in which each element can occur only once
  • Queue: This is a collection that can be manipulated at both ends
  • Map: This is a collection of key-value pairs where each element is accessible by a unique key

All of them define their own specific way to add or remove elements from collections. Let's discuss each of them.

List

The List class implements the Iterable interface and intensively uses the indexed order to iterate over elements in the collection. The List class can be of a fixed or variable length. A fixed-length list ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required