copyWith method

  1. @override
DataRefModel copyWith(
  1. BaseModel? other
)
override

Returns a new copy of the BaseModel with the fields updated from the other BaseModel.

Implementation

@override
DataRefModel copyWith(BaseModel? other) {
  final a = this.toJson();
  final b = other?.toJson();
  final c = {...a, ...?b};
  return DataRefModel.fromJson(c);
}