IteratedEncoder class abstract interface

An encoder that supports encoding iterated collections.

An SelfEncodable or Encodable implementation can encode each item by repeatedly calling a encoding method. Some data formats may not support encoding different types of items in the same collection.

The end method should be called when all items have been encoded.

Implemented types
Implementers
Available extensions

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

canEncodeCustom<T>() bool
Checks if the encoder can encode the custom type T.
inherited
encodeBool(bool value) → void
Encodes a boolean value.
inherited
encodeBoolOrNull(bool? value) → void
Encodes a nullable boolean value.
inherited
encodeDouble(double value) → void
Encodes a double value.
inherited
encodeDoubleOrNull(double? value) → void
Encodes a nullable double value.
inherited
encodeFuture<T>(Future<T> value, {Encodable<T>? using}) → void

Available on Encoder, provided by the AsyncEncoder extension

Encodes a Future of T using the provided Encodable.
encodeFutureOrNull<T>(Future<T>? value, {Encodable<T>? using}) → void

Available on Encoder, provided by the AsyncEncoder extension

Encodes a Future of T or null using the provided Encodable.
encodeInt(int value) → void
Encodes an integer value.
inherited
encodeIntOrNull(int? value) → void
Encodes a nullable integer value.
inherited
encodeIterable<E>(Iterable<E> value, {Encodable<E>? using}) → void
Encodes an iterable of E.
inherited
encodeIterableOrNull<E>(Iterable<E>? value, {Encodable<E>? using}) → void
Encodes a nullable iterable of E.
inherited
encodeIterated() IteratedEncoder
Starts encoding an iterated collection or nested values.
inherited
encodeKeyed() KeyedEncoder
Starts encoding a keyed collection or key-value pairs.
inherited
encodeMap<K, V>(Map<K, V> value, {Encodable<K>? keyUsing, Encodable<V>? valueUsing}) → void
Encodes a map of K and V.
inherited
encodeMapOrNull<K, V>(Map<K, V>? value, {Encodable<K>? keyUsing, Encodable<V>? valueUsing}) → void
Encodes a nullable map of K and V.
inherited
encodeNull() → void
Encodes 'null'.
inherited
encodeNum(num value) → void
Encodes a num value.
inherited
encodeNumOrNull(num? value) → void
Encodes a nullable num value.
inherited
encodeObject<T>(T value, {Encodable<T>? using}) → void
Encodes an object of type T.
inherited
encodeObjectOrNull<T>(T? value, {Encodable<T>? using}) → void
Encodes a nullable object of type T.
inherited
encodeReference<T>(T value, {Encodable<T>? using}) → void

Available on Encoder, provided by the ReferenceEncoder extension

Encodes a Reference of T using the provided Encodable.
encodeReferenceOrNull<T>(T? value, {Encodable<T>? using}) → void

Available on Encoder, provided by the ReferenceEncoder extension

Encodes a Reference of T or null using the provided Encodable.
encodeStream<T>(Stream<T> value, {Encodable<T>? using}) → void

Available on Encoder, provided by the AsyncEncoder extension

Encodes a Stream of T using the provided Encodable.
encodeStreamOrNull<T>(Stream<T>? value, {Encodable<T>? using}) → void

Available on Encoder, provided by the AsyncEncoder extension

Encodes a Stream of T or null using the provided Encodable.
encodeString(String value) → void
Encodes a string value.
inherited
encodeStringOrNull(String? value) → void
Encodes a nullable string value.
inherited
end() → void
Ends encoding the iterated collection.
isHumanReadable() bool
Whether a Encodable implementation should prefer to encode their human-readable form.
inherited
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