Using parameterized types with constructors

To specify one or more types when using a constructor, put the types inangle brackets (<…>) just after the class name. For example:

  1. var nameSet = Set<String>.from(names);

The following code creates a map that has integer keys and values oftype View:

  1. var views = Map<int, View>();