copyWithJson<T extends Model> method
Returns a new copy of the Model with the fields updated from otherData.
Implementation
T copyWithJson<T extends Model>(
Map<String, dynamic>? otherData,
) {
if (otherData != null && otherData.isNotEmpty) {
return this.copy<T>()..updateWithJson(otherData);
}
return this.copy<T>();
}