EncodableValue class

A candidate for direct JSON encoding.

Constructors

EncodableValue.list(List list)
Creates an EncodableValue that is based on list.
EncodableValue.map(Map<String, dynamic> map)
Creates an EncodableValue that is based on map.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

encode() String
Converts this EncodableValue to a JSON string.
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

Static Methods

fromObject<N, E>(N value, {ObjectEncoder<N, E>? encoder}) EncodableValue
Creates an EncodableValue from value.
fromObjectList<N, E>(List<N> list, {ObjectEncoder<N, E>? encoder}) EncodableValue
Creates an EncodableValue from list.
fromPrimitiveList<T>(List<T> list) EncodableValue
Creates an EncodableValue from list.
fromPrimitiveValue<T>(T value) EncodableValue
Creates an EncodableValue from value.