DateTimeRange class Null safety

Encapsulates a start and end DateTime that represent the range of dates.

The range includes the start and end dates. The start and end dates may be equal to indicate a date range of a single day. The start date must not be after the end date.

See also:

Annotations

Constructors

DateTimeRange({required DateTime start, required DateTime end})
Creates a date range for the given start and end DateTime.

Properties

duration Duration
Returns a Duration of the time between start and end.
read-only
end DateTime
The end of the range of dates.
final
hashCode int
The hash code for this object.
read-onlyoverride
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
start DateTime
The start of the range of dates.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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