TimeOfDay class
A time on a day in 24-hour format. Used in a ScheduledTrigger.
Follows the conventions in the DateTime class, but only uses the Time part in a 24 hour time format.
- Annotations
-
- @JsonSerializable(includeIfNull: false, explicitToJson: true)
Constructors
- TimeOfDay({int hour = 0, int minute = 0, int second = 0})
-
Constructs an instance of TimeOfDay.
const
- TimeOfDay.fromDateTime(DateTime time)
-
Creates a TimeOfDay based on the given
time
. -
TimeOfDay.fromJson(Map<
String, dynamic> json) -
factory
- TimeOfDay.now()
-
Constructs a TimeOfDay instance with current time in the
local time zone.
factory
Properties
Methods
-
difference(
TimeOfDay other) → Duration -
Returns a Duration with the difference when subtracting
other
fromthis
. -
isAfter(
TimeOfDay other) → bool -
Returns true if
this
occurs afterother
. -
isBefore(
TimeOfDay other) → bool -
Returns true if
this
occurs beforeother
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
Output as ISO 8601 extended time format with seconds accuracy, omitting
the 24th hour and 60th leap second. E.g., "09:30:00".
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited