isValid method
Tells whether the instance is valid.
Implementation
@override
bool isValid(double instance) {
{
final min = this.min;
if (min != null) {
if (isExclusiveMin) {
if (instance <= min) {
return false;
}
} else {
if (instance < min) {
return false;
}
}
}
}
{
final max = this.max;
if (max != null) {
if (isExclusiveMax) {
if (instance >= max) {
return false;
}
} else {
if (instance > max) {
return false;
}
}
}
}
return super.isValid(instance);
}