Maps. Keys and Values

Let’s learn to create a map in Dart.

Overview

A map is an unordered collection of key-value pairs. It associates keys and values. Every value has a key. This means that every key must be unique, however, the same value can be used multiple times. Two items with the same value will still be unique through their separate key.

Use a map when you need to access objects by a unique identifier.

Maps are of the type Map.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy