validate method
void
validate()
Implementation
void validate() {
if (!available && enabled) {
throw const FormatException(
'An unavailable flashlight cannot be enabled.',
);
}
}
void validate() {
if (!available && enabled) {
throw const FormatException(
'An unavailable flashlight cannot be enabled.',
);
}
}