Time constructor
- @literal
Creates a Time with the given time.
Implementation
@literal
const Time(
this.hour, [
this.minute = 0,
this.second = 0,
this.millisecond = 0,
this.microsecond = 0,
]) : assert(hour >= 0 && hour < 24,
'Invalid hour: $hour, hour must be between 0 and 23'),
assert(minute >= 0 && minute < 60,
'Invalid minute: $minute, minute must be between 0 and 59'),
assert(second >= 0 && second < 60,
'Invalid second: $second, second must be between 0 and 59'),
assert(millisecond >= 0 && millisecond < 1000,
'Invalid millisecond: $millisecond, millisecond must be between 0 and 999'),
assert(microsecond >= 0 && microsecond < 1000,
'Invalid microsecond: $microsecond, microsecond must be between 0 and 999');