copyWith method

AbiParameter copyWith({
  1. String? name,
  2. String? type,
  3. String? baseType,
  4. bool? indexed,
  5. List<AbiParameter>? components,
  6. String? internalType,
})

Creates a new AbiParameter instance with updated values. If a parameter is not specified in the copy, the current value is retained.

Implementation

AbiParameter copyWith({
  String? name,
  String? type,
  String? baseType,
  bool? indexed,
  List<AbiParameter>? components,
  String? internalType,
}) {
  return AbiParameter(
    name: name ?? this.name,
    type: type ?? this.type,
    baseType: baseType ?? this.baseType,
    indexed: indexed ?? this.indexed,
    components: components ?? List.from(this.components),
    internalType: internalType ?? this.internalType,
  );
}