0PricingLogin
Dart Academy · Lesson

Sets and Guaranteed Uniqueness

Store items without duplicates.

What a Set Is

A Set is an unordered collection where every item is unique. It is your go-to tool when duplicates simply should not exist. 👍

Creating a Set

Use curly braces with values to make a Set. Dart sees the items and knows this is a set, not a map.

var colors = {'red', 'green', 'blue'};

All lessons in this course

  1. Sets and Guaranteed Uniqueness
  2. Set Operations: union, intersection, difference
  3. Maps as Key-Value Stores
  4. Iterating Entries, Keys, and Values
← Back to Dart Academy