ListCodec class
List Codec
Constructors
-
ListCodec()
-
Converts between
List<Serialisable> and List<T>.
const
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
-
cast<T>(List value)
→ List<T>
-
Returns a view of the given
value as a list of T instances.
-
decode<T, U>(Iterable items, JsonRpcParser<T, U> parse, {bool growable = false})
→ List<T>
-
Converts a serialised list of
items into a List<T>.
-
encode(Iterable<Serialisable> items, {bool growable = false})
→ List<Map<String, dynamic>>
-
Converts a Serialisable list of
items into a List<Map<String, dynamic>>.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
tryCast<T>(List? value)
→ List<T>?
-
Returns a view of the given
value as a list of T instances or null if value is
omitted.
-
tryDecode<T, U>(Iterable? items, JsonRpcParser<T, U> parse, {bool growable = false})
→ List<T>?
-
Converts a encoded list of
items into a List<T>.
-
tryEncode(Iterable<Serialisable>? items, {bool growable = false})
→ List<Map<String, dynamic>>?
-
Converts a Serialisable list of
items into a List<Map<String, dynamic>>.