copyWith method

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

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

Implementation

@override
Model copyWith(BaseModel? other) {
  return Model({
    ...this.toJson(),
    ...?other?.toJson(),
  });
}