Spread and Null-Aware Spread
Inline one collection into another.
Combining Collections
Often you want to drop all items of one list into another. Dart's spread operator inlines a whole collection in a single move.
Meet Three Dots
The spread operator is three dots placed before a collection inside a list, set, or map literal. Its items pour right in.
var more = [4, 5];
var all = [1, 2, 3, ...more];All lessons in this course
- The Cascade Operator (..)
- Null-Shorting Cascades (?..)
- Spread and Null-Aware Spread
- Collection if and for