DateTimeStrategy enum
Strategy for encoding DateTime values to JSON.
Used by JsonOptions.dateTimeStrategy to control how dates are serialized.
- Inheritance
- Available extensions
Values
- iso8601String → const DateTimeStrategy
-
ISO 8601 string format (e.g.,
"2025-11-11T10:15:30.123Z").This is the most portable format and preserves timezone information.
- millisecondsSinceEpoch → const DateTimeStrategy
-
Milliseconds since Unix epoch (1970-01-01T00:00:00Z) as an integer.
Compact but loses sub-millisecond precision.
- microsecondsSinceEpoch → const DateTimeStrategy
-
Microseconds since Unix epoch as an integer.
Preserves full DateTime precision but produces large numbers.
Properties
-
$
→ Signal<
T> -
Available on T, provided by the SignalEnumExtensions extension
Return a signal from a Enum valueno setter - hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
Constants
-
values
→ const List<
DateTimeStrategy> - A constant List of the values in this enum, in order of their declaration.