JsonDecoder class

Implemented types
Implementers
Available extensions

Constructors

JsonDecoder.new(List<int> buffer, [int offset = 0])

Properties

buffer List<int>
final
hashCode int
The hash code for this object.
no setterinherited
offset int
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clone() JsonDecoder
Creates a new Decoder that is a copy of this one.
override
decodeBool() bool
Decodes the data as a boolean value.
override
decodeBoolOrNull() bool?
Decodes the data as a nullable boolean value.
override
decodeDouble() double
Decodes the data as a double value.
override
decodeDoubleOrNull() double?
Decodes the data as a nullable double value.
override
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.
override
decodeIntOrNull() int?
Decodes the data as a nullable integer value.
override
decodeIsNull() bool
Checks if the data is null.
override
decodeIterated() IteratedDecoder
Decodes the data as an iterated collection of nested data.
override
decodeKeyed() KeyedDecoder
Decodes the data as a collection of key-value pairs. The pairs are decoded in order of appearance in the encoded data.
override
decodeList<I>({Decodable<I>? using}) List<I>
Decodes the data as a list of elements.
override
decodeListOrNull<I>({Decodable<I>? using}) List<I>?
Decodes the data as a nullable list of elements.
override
decodeMap<K, V>({Decodable<K>? keyUsing, Decodable<V>? valueUsing}) Map<K, V>
Decodes the data as a map of key-value pairs.
override
decodeMapOrNull<K, V>({Decodable<K>? keyUsing, Decodable<V>? valueUsing}) Map<K, V>?
Decodes the data as a nullable map of key-value pairs.
override
decodeMapped() MappedDecoder
Decodes the data as a collection of key-value pairs. The values are accessed and decoded based on the provided key.
override
decodeNum() num
Decodes the data as a num value.
override
decodeNumOrNull() num?
Decodes the data as a nullable num value.
override
decodeObject<T>({Decodable<T>? using}) → T
Decodes the data as an object of type T.
override
decodeObjectOrNull<T>({Decodable<T>? using}) → T?
Decodes the data as a nullable object of type T.
override
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.
override
decodeStringOrNull() String?
Decodes the data as a nullable string value.
override
expect(String expected) → Never
Throws an exception with a detailed message.
override
isHumanReadable() bool
Whether a Decodable implementation should expect to decode their human-readable form.
override
nextItem() bool
Moves to the next item in the collection.
override
nextKey() String?
Moves to the next key-value pair in the collection and returns the key.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
skipBytes(int count) → void
skipCurrentItem() → void
Skips the current item in the collection.
override
skipCurrentValue() → void
Skips the current value in the collection.
override
skipRemainingItems() → void
Skips the remaining items in the collection.
override
skipRemainingKeys() → void
Skips the remaining key-value pairs in the collection.
override
skipWhitespace() → void
toString() String
A string representation of this object.
inherited
whatsNext() DecodingType
Returns the actual or preferred DecodingType of the encoded data.
override

Operators

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

Static Methods

decode<T>(List<int> value, Decodable<T> decodable) → T
decodeLazy<T>(void onValue(T), Decodable<T> decodable, {void onError(Object error, [StackTrace? stackTrace])?, required void onDone()}) EventSink<List<int>>