addParameterToSupertype method

void addParameterToSupertype(
  1. String supertypeName,
  2. Type parameter
)

Implementation

void addParameterToSupertype(String supertypeName, Type parameter) {
  final parameters = switch (_supertype) {
    final supertype? => {...supertype.$2, parameter},
    null => [parameter],
  };

  _supertype = (supertypeName, parameters.toList());
}