Dart version 3: Alpha around January 2023
List comprehension in Dart; Also shows parallel iteration of two lists
No way to create an inline function literal. Use top level function instead.
A good example of this use case in Dart is the abstract HTML Element class, which defines dozens of named factory constructor functions returning different subclasses. For example, Element.div() and Element.li() return and elements, respectively.