fxProps

Returns the values of several keys in a Map, as a List.

List<V?> fxProps<K, V>(Iterable<K> propKeys, Map<K, V> map)

Lecture

fxProps is fxProp applied to several keys at once, in order: give it a list of keys and a map, and get back a List<V?> with one slot per requested key. Unlike fxPick, a missing key does not get dropped from the result — it becomes null in that position, so the output List always has the same length as propKeys. That positional guarantee is what makes it pair so well with Dart's list-destructuring pattern.

Demo 1 · Basics

Demo 2 · Destructuring the result

Try it yourself

Exercise: use fxProps to pull ['first', 'last'] out of row as a List.

Related: fxProp — a single key at a time · fxPick — the Map-shaped equivalent · fxFromEntries — build a Map back up · fxEvolve — transform selected values in place