copyWithType method

  1. @override
Parameter copyWithType(
  1. TypeDeclaration type
)
override

Returns a copy of Parameter instance with new attached TypeDeclaration.

Implementation

@override
Parameter copyWithType(TypeDeclaration type) {
  return Parameter(
    name: name,
    type: type,
    offset: offset,
    defaultValue: defaultValue,
    isNamed: isNamed,
    isOptional: isOptional,
    isPositional: isPositional,
    isRequired: isRequired,
    documentationComments: documentationComments,
  );
}