Maps in Dart

What is Map?

The Map is to create unordered collection elements of key-value pairs.

A map, commonly known as a dictionary or hash.

You can create Map in following ways:

  1. Map literals.
  2. Map constructor.
  3. Parameterized type Map literal.
  4. Parameterized type Map Constructor.

The Map class also defines several methods for manipulating set values or variables, like, putIfAbsent, remove, containsKey, containsValue etc.

Note: Learn more about Maps in Learn Dart Collections Course.