equals method
Compares the BaseModel with another BaseModel using the
DeepCollectionEquality
and returns true
if they are equal.
Implementation
bool equals(dynamic other) {
if (other is BaseModel) {
return const DeepCollectionEquality().equals(other.toJson(), toJson());
} else {
return false;
}
}