JsonKey<T, Serialized> class abstract base

A key that can be used to parse a value from json.

Implementers

Constructors

JsonKey.parser(String key, T parser(Serialized))
Create a JsonKey that parses a value from json.
JsonKey.populated(String key, T val)
Create a JsonKey that has already been populated with a value.

Properties

hashCode int
The hash code for this object.
no setterinherited
key String
The key used to parse the value from json.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serialized → Serialized
The serialized value of this JsonKey.
no setter
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
value → T
The value of this JsonKey.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(Serialized serialized) → T
Parse a value from json, and populate this JsonKey with the parsed value.
populate(T value) → void
Populate this JsonKey with a value.
serialize(T value) → Serialized
Serialize a value to json.
toString() String
A string representation of this object.
inherited

Operators

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