IllegalValueException constructor
IllegalValueException({
- Object? value,
Throws an exception when the RadioGroupController tries to set a value that is not part of the RadioGroup's value list.
radioGroupController
is the controller that is throwing the error.
Implementation
IllegalValueException({Object? value}) {
// Check to see if the value that caused `this` exception to be thrown was
// provided.
if (value == null) {
// If no value was provided, throw the default error message.
throw (_cause);
} else {
// If the value was provided, include it in the error message to help with
// debugging.
throw ("$_errMsgPt1 ${value.runtimeType}:${value.toString()} $_errMsgPt2");
}
}