copyWithEnum method

TypeDeclaration copyWithEnum(
  1. Enum enumDefinition
)

Returns duplicated TypeDeclaration with attached associatedEnum value.

Implementation

TypeDeclaration copyWithEnum(Enum enumDefinition) {
  return TypeDeclaration(
    baseName: baseName,
    isNullable: isNullable,
    associatedEnum: enumDefinition,
    typeArguments: typeArguments,
  );
}