copyWith method

TypeMember copyWith({
  1. String? name,
  2. AbstractType? type,
  3. List<TypeAnnotation>? annotations,
})

Create a copy of this TypeMember and override with given values.

Implementation

TypeMember copyWith({
  /// Name of this field.
  String? name,

  /// Type of this field.
  AbstractType? type,

  /// Type annotations
  List<TypeAnnotation>? annotations,
}) =>
    TypeMember(
      name: name ?? this.name,
      type: type ?? this.type,
      annotations: annotations ?? this.annotations,
    );