instantiate abstract method

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

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

Note that this always instantiates the typedef itself, so for a TypeAliasElement2 the returned DartType might still be a generic type, with type formals. For example, if the typedef is:

typedef F<T> = void Function<U>(T, U);

then F<int> will produce void Function<U>(int, U).

Implementation

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