Generics: Using parameterized types with constructors

Using parameterized types with constructors

var nameSet = Set<String>.from(names);
var views = Map<int, View>();

To specify one or more types when using a constructor, put the types in angle brackets (<...>) just after the class name.

Related concepts

Using parameterized types with constructors

Generics: Using parameterized types with constructors — Structure map

Clickable & Draggable!

Generics: Using parameterized types with constructors — Related pages: