TimeOfDayRange class

Encapsulates a start and end TimeOfDay that represents a day time range.

  • The range includes the start and end times.
  • The start time must be before to the end time.

Constructors

TimeOfDayRange({required TimeOfDay start, required TimeOfDay end})
TimeOfDayRange.allDay()
Creates a TimeOfDayRange that represents an entire day.
factory
TimeOfDayRange.forHour(int hour)
Creates a TimeOfDayRange that represents the given hour.
factory
TimeOfDayRange.fromDateTimeRange(DateTimeRange<DateTime> dateTimeRange)
Creates a TimeOfDayRange from the given DateTimeRange.
factory

Properties

duration Duration
Returns a Duration representing the time difference between the start and end.
no setter
end TimeOfDay
The end time of the range.
final
hashCode int
The hash code for this object.
no setteroverride
isAllDay bool
Whether the TimeOfDayRange is an all day range.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
start TimeOfDay
The start time of the range.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
splitIntoSegments(int segmentLength) List<TimeOfDayRange>
Generates a list of TimeOfDayRange segments from the current TimeOfDayRange.
toString() String
A string representation of this object.
override

Operators

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