Time class final

Implemented types
Annotations
  • @immutable

Constructors

Time.nowInLocalZone({Clock? clock})
factory
Time.nowInUtc({Clock? clock})
factory

Properties

fraction → FractionalSeconds
final
fractionalSecondsSinceMidnight → FractionalSeconds
no setter
hashCode → int
The hash code for this object.
no setteroverride
hour → int
final
hoursSinceMidnight → Hours
no setter
minute → int
final
minutesSinceMidnight → Minutes
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
second → int
final
secondsSinceMidnight → Seconds
no setter

Methods

add(TimeDuration duration) → Result<Time, String>
compareTo(Time other) → int
Compares this object to another object.
override
copyWith({int? hour, int? minute, int? second, FractionalSeconds? fraction}) → Result<Time, String>
difference(Time other) → FractionalSeconds
Returns this - other.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
roundToMultipleOf(TimeDuration duration, {Rounding rounding = Rounding.nearestAwayFromZero}) → Time
subtract(TimeDuration duration) → Result<Time, String>
toString() → String
A string representation of this object.
override

Operators

operator <(Time other) → bool
inherited
operator <=(Time other) → bool
inherited
operator ==(Object other) → bool
The equality operator.
override
operator >(Time other) → bool
inherited
operator >=(Time other) → bool
inherited

Static Properties

midnight → Time
final
noon → Time
final

Static Methods

from(int hour, [int minute = 0, int second = 0, FractionalSeconds? fraction]) → Result<Time, String>
fromTimeSinceMidnight(TimeDuration timeSinceMidnight) → Result<Time, String>
lerp(Time a, Time b, double t, {int factorPrecisionAfterComma = 8}) → Result<Time, String>
lerpNullable(Time? a, Time? b, double t, {int factorPrecisionAfterComma = 8}) → Result<Time, String>?