equals method
Checks if the given value is equal to the current state value.
This method can be overridden to provide custom equality logic, including deep equality for complex objects.
Implementation
@override
bool equals(T other) {
if (_shouldThrowOnEquals) {
throw _customException ?? Exception('Mock equals error');
}
if (_customEquals != null) {
return _customEquals!(_value, other);
}
return _value == other;
}