IteratedDecoder class abstract

A decoder that can decode iterated collections of data.

A Decodable implementation can iterate over the collection and decode each item individually. Before each item, the implementation must call nextItem to move to the next (or initial) item. The implementation must either call a decoding method, or call skipCurrentItem before calling nextItem again.

A Decodable implementation can also skip the remaining items in the collection by calling skipRemainingItems.

Implemented types
Implementers
Available extensions

Constructors

IteratedDecoder.new()

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

clone() IteratedDecoder
Creates a new Decoder that is a copy of this one.
override
decodeBool() bool
Decodes the data as a boolean value.
inherited
decodeBoolOrNull() bool?
Decodes the data as a nullable boolean value.
inherited
decodeDouble() double
Decodes the data as a double value.
inherited
decodeDoubleOrNull() double?
Decodes the data as a nullable double value.
inherited
decodeFuture<T>({Decodable<T>? using}) Future<T>

Available on Decoder, provided by the AsyncDecoder extension

Decodes a Future of T using the provided Decodable.
decodeFutureOrNull<T>({Decodable<T>? using}) Future<T>?

Available on Decoder, provided by the AsyncDecoder extension

Decodes a Future of T or null using the provided Decodable.
decodeInt() int
Decodes the data as an integer value.
inherited
decodeIntOrNull() int?
Decodes the data as a nullable integer value.
inherited
decodeIsNull() bool
Checks if the data is null.
inherited
decodeIterated() IteratedDecoder
Decodes the data as an iterated collection of nested data.
inherited
decodeKeyed() KeyedDecoder
Decodes the data as a collection of key-value pairs. The pairs are decoded in order of appearance in the encoded data.
inherited
decodeList<E>({Decodable<E>? using}) List<E>
Decodes the data as a list of elements.
inherited
decodeListOrNull<E>({Decodable<E>? using}) List<E>?
Decodes the data as a nullable list of elements.
inherited
decodeMap<K, V>({Decodable<K>? keyUsing, Decodable<V>? valueUsing}) Map<K, V>
Decodes the data as a map of key-value pairs.
inherited
decodeMapOrNull<K, V>({Decodable<K>? keyUsing, Decodable<V>? valueUsing}) Map<K, V>?
Decodes the data as a nullable map of key-value pairs.
inherited
decodeMapped() MappedDecoder
Decodes the data as a collection of key-value pairs. The values are accessed and decoded based on the provided key.
inherited
decodeNum() num
Decodes the data as a num value.
inherited
decodeNumOrNull() num?
Decodes the data as a nullable num value.
inherited
decodeObject<T>({Decodable<T>? using}) → T
Decodes the data as an object of type T.
inherited
decodeObjectOrNull<T>({Decodable<T>? using}) → T?
Decodes the data as a nullable object of type T.
inherited
decodeReference<T>({Decodable<T>? using}) Reference<T>

Available on Decoder, provided by the ReferenceDecoder extension

Decodes a Reference of T using the provided Decodable.
decodeReferenceOrNull<T>({Decodable<T>? using}) Reference<T>?

Available on Decoder, provided by the ReferenceDecoder extension

Decodes a Reference of T or null using the provided Decodable.
decodeStream<T>({Decodable<T>? using}) Stream<T>

Available on Decoder, provided by the AsyncDecoder extension

Decodes a Stream of T using the provided Decodable.
decodeStreamOrNull<T>({Decodable<T>? using}) Stream<T>?

Available on Decoder, provided by the AsyncDecoder extension

Decodes a Stream of T or null using the provided Decodable.
decodeString() String
Decodes the data as a string value.
inherited
decodeStringOrNull() String?
Decodes the data as a nullable string value.
inherited
expect(String expected) → Never
Throws an exception with a detailed message.
inherited
isHumanReadable() bool
Whether a Decodable implementation should expect to decode their human-readable form.
inherited
nextItem() bool
Moves to the next item in the collection.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
skipCurrentItem() → void
Skips the current item in the collection.
skipRemainingItems() → void
Skips the remaining items in the collection.
toString() String
A string representation of this object.
inherited
whatsNext() DecodingType
Returns the actual or preferred DecodingType of the encoded data.
inherited

Operators

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