instantiate method Null safety

DartType instantiate(
  1. {required List<DartType> typeArguments,
  2. required NullabilitySuffix nullabilitySuffix}

Produces the type resulting from instantiating this typedef with the given typeArguments and nullabilitySuffix.

Note that this always instantiates the typedef itself, so for a TypeAliasElement the returned DartType might still be a generic type, with type formals. For example, if the typedef is: typedef F = void Function(T, U); then F<int> will produce void Function<U>(int, U).


DartType instantiate({
  required List<DartType> typeArguments,
  required NullabilitySuffix nullabilitySuffix,