RelativeDayResult class
Outcome of a relative-day classification: the type bucket plus an optional weekdayName for the SimpleRelativeDay.lastWeekday / SimpleRelativeDay.nextWeekday buckets.
weekdayName is non-null only when the caller supplied a weekdayFormatter
to DateTimeSimpleRelativeDayExtension.getRelativeDayResult AND the bucket
is a weekday bucket. For all exact buckets (today, tomorrow, …) and for
lastMonth / nextMonth, weekdayName is null — the formatter is never
invoked for those, so callers never pay for a label they cannot use.
Example:
const RelativeDayResult(SimpleRelativeDay.today); // weekdayName == null
RelativeDayResult(SimpleRelativeDay.nextWeekday, weekdayName: 'Friday');
Constructors
- RelativeDayResult(SimpleRelativeDay type, {String? weekdayName})
-
Creates a result for the given
type, with an optionalweekdayNamethat callers attach only for the weekday buckets. Audited: 2026-06-12 11:26 EDTconst
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → SimpleRelativeDay
-
The classified calendar-day bucket.
final
- weekdayName → String?
-
Locale-formatted weekday string for weekday buckets, else
null.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited