DateTimeRange class
Represents a range of dates with a start and end time.
Immutable value type for representing a continuous period between two dates. Commonly used with date range pickers to specify selected date intervals.
Example:
final range = DateTimeRange(
DateTime(2024, 1, 1),
DateTime(2024, 1, 31),
);
Constructors
- DateTimeRange(DateTime start, DateTime end)
-
Creates a DateTimeRange.
const
Properties
Methods
-
copyWith(
{ValueGetter< DateTime> ? start, ValueGetter<DateTime> ? end}) → DateTimeRange - Creates a copy of this range with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override