DateTimeMapper class Models
A mapper that encodes a DateTime object into a serializable date format and vice versa.
The encoding mode can be specified using the DateTimeMapper.encodingMode flag as either a Iso8601 String, a UTC Iso8601 String or a unix milliseconds integer.
- Inheritance
-
- Object
- MapperBase<
DateTime> - SimpleMapper<
DateTime> - DateTimeMapper
Constructors
- DateTimeMapper()
-
const
Properties
- container → MapperContainer
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
A unique id for this type, defaults to the name of the type.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → Type
-
A getter for the type of this mapper.
no setterinherited
- typeFactory → Function
-
A type factory is what makes generic types work.
no setterinherited
Methods
-
decode(
dynamic value) → DateTime -
override
-
decoder(
Object value, DecodingContext context) → DateTime -
The mapping method to decode
value
to an instance of this mappers type.inherited -
decodeValue<
V> (Object? value, [DecodingOptions? options, MapperContainer? container]) → V -
inherited
-
encode(
DateTime self) → Object -
override
-
encoder(
DateTime value, EncodingContext context) → Object? -
The mapping method to encode
value
to a serializable value.inherited -
encodeValue<
V> (V value, [EncodingOptions? options, MapperContainer? container]) → Object? -
inherited
-
equals(
DateTime value, DateTime other, MappingContext context) → bool -
The mapping method to compare
value
andother
for equality.inherited -
equalsValue(
DateTime value, Object? other, [MapperContainer? container]) → bool -
inherited
-
hash(
DateTime value, MappingContext context) → int -
The mapping method to calculate the hash of
value
.inherited -
hashValue(
DateTime value, [MapperContainer? container]) → int -
inherited
-
includeTypeId<
V> (dynamic v) → bool -
inherited
-
isFor(
dynamic v) → bool -
inherited
-
isForType(
Type type) → bool -
inherited
-
isValueEqual(
DateTime value, Object? other, [MapperContainer? container]) → bool -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
stringify(
DateTime value, MappingContext context) → String -
The mapping method to get the string representation of
value
.inherited -
stringifyValue(
DateTime value, [MapperContainer? container]) → String -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- encodingMode ↔ DateTimeEncoding
-
Defines how a DateTime object is encoded. See DateTimeEncoding for all
possible values.
getter/setter pair