decodeObject<T> method
Decodes the data as an object of type T
.
This forwards the decoding to the provided Decodable implementation.
Otherwise tries to decode the data to a supported primitive type T
.
This should only be called if the format returned a DecodingType<T>
from whatsNext or
is otherwise known to support T
as a custom type.
Implementation
@override
T decodeObject<T>({Decodable<T>? using}) {
if (using != null) {
return using.decode(this);
} else {
return _read() as T;
}
}