StandardEncoder class

Implemented types
Available extensions

Constructors

StandardEncoder.new([bool _isHumanReadable = true, List<CustomTypeDelegate> _customTypes = 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

canEncodeCustom<T>() bool
inherited
encodeBool(bool value) → void
Encodes a boolean value.
override
encodeBoolOrNull(bool? value) → void
Encodes a nullable boolean value.
override
encodeDouble(double value) → void
Encodes a double value.
override
encodeDoubleOrNull(double? value) → void
Encodes a nullable double value.
override
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.
override
encodeIntOrNull(int? value) → void
Encodes a nullable integer value.
override
encodeIterable<E>(Iterable<E> value, {Encodable<E>? using}) → void
Encodes an iterable of E.
override
encodeIterableOrNull<E>(Iterable<E>? value, {Encodable<E>? using}) → void
Encodes a nullable iterable of E.
override
encodeIterated() IteratedEncoder
Starts encoding an iterated collection or nested values.
override
encodeKeyed() KeyedEncoder
Starts encoding a keyed collection or key-value pairs.
override
encodeMap<K, V>(Map<K, V> value, {Encodable<K>? keyUsing, Encodable<V>? valueUsing}) → void
Encodes a map of K and V.
override
encodeMapOrNull<K, V>(Map<K, V>? value, {Encodable<K>? keyUsing, Encodable<V>? valueUsing}) → void
Encodes a nullable map of K and V.
override
encodeNull() → void
Encodes 'null'.
override
encodeNum(num value) → void
Encodes a num value.
override
encodeNumOrNull(num? value) → void
Encodes a nullable num value.
override
encodeObject<T>(T value, {Encodable<T>? using}) → void
Encodes an object of type T.
override
encodeObjectOrNull<T>(T? value, {Encodable<T>? using}) → void
Encodes a nullable object of type T.
override
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.
override
encodeStringOrNull(String? value) → void
Encodes a nullable string value.
override
isHumanReadable() bool
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

Static Methods

encode<T>(T value, {Encodable<T>? using, bool isHumanReadable = true, List<CustomTypeDelegate> customTypes = const []}) Object?