copyWith<NewType> method

PartValue<NewType> copyWith<NewType>({
  1. String? name,
  2. NewType? value,
})

Makes a copy of this PartValue, replacing original values with the given ones. This method can also alter the type of the request body.

Implementation

PartValue<NewType> copyWith<NewType>({String? name, NewType? value}) =>
    PartValue<NewType>(
      name ?? this.name,
      value ?? this.value as NewType,
    );