TimeAgoDuration class

Represents a parsed 'time ago' duration (value and unit).

Constructors

TimeAgoDuration(int value, TimeUnit unit)

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
unit → TimeUnit
The unit of time (e.g., TimeUnit.minutes).
final
value → int
The numeric value (e.g., '5' in "5 minutes").
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDateTime() → DateTime
Calculate a past DateTime relative to DateTime.now().
Months/years are calendar-aware. Throws if unit is unknown.
toDuration() → Duration
Converts to a Dart Duration.
toString() → String
Returns a string representation (e.g., '5 minutes').
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited