HourMinute class

Simply represents a hour and a minute. This is not a duration but more of an instant in the current day.

Constructors

HourMinute({int hour = 0, int minute = 0})
Creates a new hour minute time instance.
const
HourMinute.fromDateTime({required DateTime dateTime})
Creates a new hour minute time instance from a given date time object.
HourMinute.fromDuration({required Duration duration})
Creates a new hour minute time instance from a given date time object.
factory
HourMinute.now()
Creates a new hour minute time instance.

Properties

asDuration Duration
Converts this instance into a duration.
no setter
hashCode int
The hash code for this object.
no setteroverride
hour int
The current hour.
final
minute int
The current minute.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(HourMinute other) HourMinute
Calculates the sum of this hour minute and another.
atDate(DateTime date) DateTime
Attaches this instant to a provided date.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
subtract(HourMinute other) HourMinute
Calculates the difference between this hour minute and another.
toString() String
A string representation of this object.
override

Operators

operator <(dynamic other) bool
operator <=(dynamic other) bool
operator ==(Object other) bool
The equality operator.
override
operator >(dynamic other) bool
operator >=(dynamic other) bool

Constants

max → const HourMinute
"Max" time.
min → const HourMinute
"Min" time.
zero → const HourMinute
"Zero" time.