copyWith method

ClassProperty copyWith({
  1. TypeName? type,
  2. ClassPropertyName? name,
  3. List<String>? annotations,
  4. bool? isResolveType,
})

Creates a copy of ClassProperty without modifying the original.

Implementation

ClassProperty copyWith({
  TypeName? type,
  ClassPropertyName? name,
  List<String>? annotations,
  bool? isResolveType,
}) =>
    ClassProperty(
      type: type ?? this.type,
      name: name ?? this.name,
      annotations: annotations ?? this.annotations,
      isResolveType: isResolveType ?? this.isResolveType,
    );