instantiate method

  1. @override
DartType instantiate(
  1. NamedDartType typeRef
)
override

instantiates the type parameters of this element with the given type

Implementation

@override
DartType instantiate(NamedDartType typeRef) {
  Substitution substitution = Substitution.fromPairs(typeParameters, typeRef.typeArguments);
  return substitution.substituteType(aliasedType, isNullable: typeRef.isNullable);
}