KalenderTimeRange class final Dates and times

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

  • The range includes the start and end times.
  • The start time must not be after the end time.

Constructors

KalenderTimeRange({required KalenderTime start, required KalenderTime end})
KalenderTimeRange.allDay()
Creates a KalenderTimeRange that represents an entire day.
factory
KalenderTimeRange.forHour(int hour)
Creates a KalenderTimeRange that represents the given hour.
factory
KalenderTimeRange.fromDateTimeRange(KalenderDateTimeRange dateTimeRange)
Creates a KalenderTimeRange from the given KalenderDateTimeRange.
factory

Properties

coversWholeDay bool
Whether this range runs from 00:00 to 23:59.
no setter
duration Duration
Returns a Duration representing the time difference between the start and end.
no setter
end KalenderTime
The end time of the range.
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
start KalenderTime
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<KalenderTimeRange>
Generates a list of KalenderTimeRange segments from the current KalenderTimeRange.
toString() String
A string representation of this object.
override

Operators

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