TimeOnly class final

An object that represents a time without the date component.

Implemented types

Constructors

TimeOnly.withHourMinutesSeconds({required int hours, required int minutes, required int seconds})
Creates a new time-only object from the provided hours, minutes, and seconds.
factory
TimeOnly.withString(String timeString)
Creates a new time-only object from the ISO 8601 time value, HH:MM:SS.
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
hours int
Gets the hours component of the time represented by this instance.
no setter
minutes int
Gets the minutes component of the time represented by this instance.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
seconds int
Gets the seconds component of the time represented by this instance.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Returns a string representing the time in ISO 8601 format, HH:MM:SS.
override

Operators

operator ==(Object other) bool
The equality operator.
override