hour property
int
hour
Range: 0 - 23 (inclusive)
Throws InvalidHourException if hour
is set to a value that is not in
the valid range.
Implementation
int get hour => _hour;
Implementation
set hour(int hour) {
if (hour >= 0 && hour <= 23) {
_hour = hour;
} else {
throw InvalidHourException.withValue(hour);
}
}