DateTimeCodable class

A DateTime codable that can encode and decode a date in different formats.

Implemented types

Constructors

DateTimeCodable({DateTimeFormat preferredFormat = DateTimeFormat.auto, bool convertUtc = false})
const

Properties

convertUtc → bool
Whether to convert the date
final
hashCode → int
The hash code for this object.
no setterinherited
preferredFormat → DateTimeFormat
The preferred format to encode and decode the date. If DateTimeFormat.auto is used, the format will be determined based on the decoder / encoder. If DateTimeFormat.iso8601 is used, the date will be encoded as an ISO8601 string. If DateTimeFormat.unixMilliseconds is used, the date will be encoded as a unix milliseconds integer.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

decode(Decoder decoder) → DateTime
Decodes a value of type T using the decoder.
override
encode(DateTime value, Encoder encoder) → void
Encodes the value using the encoder.
override
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