ObjectCodable class
A Codable that can encode and decode standard Dart objects (Maps, Lists, etc.).
- Implemented types
- Available extensions
- AsAsyncCodable
- AsAsyncDecodable
- AsFutureEncodable
- AsListCodable
- AsListDecodable
- AsListEncodable
- AsMapCodable
- AsNullableCodable
- AsNullableDecodable
- AsNullableListEncodable
- AsSetCodable
- AsSetDecodable
- AsSetEncodable
- CsvDecodable
- CsvEncodable
- JsonDecodable
- JsonEncodable
- JsonLazyDecodable
- JsonLazyStreamDecodable
- MsgPackDecodable
- MsgPackEncodable
- ProgressiveJsonDecodable
- ProgressiveJsonEncodable
- StandardCodec
- StandardDecodable
- StandardEncodable
Constructors
- ObjectCodable.new()
-
const
Properties
-
codec
→ Codec<
T, Object?> -
Available on Codable<
T> , provided by the StandardCodec extensionno setter - hashCode → int
-
The hash code for this object.
no setterinherited
-
orNull
→ Codable<
T?> -
Available on Codable<
Returns a Codable that can encode and decodeT> , provided by the AsNullableCodable extensionT
or null.no setter -
orNull
→ Decodable<
T?> -
Available on Decodable<
Returns a Decodable object that can decodeT> , provided by the AsNullableDecodable extensionT
or null.no setter -
orNull
→ Encodable<
T?> -
Available on Encodable<
Returns an Encodable that can encodeT> , provided by the AsNullableListEncodable extensionT
or null.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
decode(
Decoder decoder) → Object? -
Decodes a value of type
T
using thedecoder
.override -
decodeLazy(
LazyDecoder decoder, void resolve(Object? value)) → void -
override
-
encode(
Object? value, Encoder encoder) → void -
Encodes the
value
using theencoder
.override -
fromCsv(
String csv) → List< T> -
Available on Decodable<
Decodes a CSV string into a list of objects.T> , provided by the CsvDecodable extension -
fromCsvBytes(
List< int> bytes) → List<T> -
Available on Decodable<
T> , provided by the CsvDecodable extension -
fromJson(
String json) → T -
Available on Decodable<
T> , provided by the JsonDecodable extension -
fromJsonBytes(
List< int> bytes) → T -
Available on Decodable<
T> , provided by the JsonDecodable extension -
fromJsonStream(
Stream< List< json) → Future<int> >T> -
Available on LazyDecodable<
T> , provided by the JsonLazyDecodable extension -
fromJsonStream(
Stream< List< json) → Stream<int> >T> -
Available on LazyDecodable<
Stream< , provided by the JsonLazyStreamDecodable extensionT> > -
fromMap(
Map< String, dynamic> map) → T -
Available on Decodable<
T> , provided by the StandardDecodable extension -
fromMsgPack(
List< int> bytes) → T -
Available on Decodable<
T> , provided by the MsgPackDecodable extension -
fromProgressiveJson(
List< int> bytes) → T -
Available on Decodable<
Decodes progressive JSON bytes intoT> , provided by the ProgressiveJsonDecodable extensionT
. -
fromProgressiveJsonStream(
Stream< List< bytes) → Stream<int> >T> -
Available on Decodable<
Decodes a progressive JSON byte stream into a Stream ofT> , provided by the ProgressiveJsonDecodable extensionT
. -
fromValue(
Object? value) → T -
Available on Decodable<
T> , provided by the StandardDecodable extension -
future(
) → Codable< Future< T> > -
Available on Codable<
Returns a Codable that can encode and decode a future ofT> , provided by the AsAsyncCodable extensionT
. -
future(
) → Decodable< Future< T> > -
Available on Decodable<
Returns a Decodable object that can decode a future ofT> , provided by the AsAsyncDecodable extensionT
. -
future(
) → Encodable< Future< T> > -
Available on Encodable<
Returns an Encodable that can encode a future ofT> , provided by the AsFutureEncodable extensionT
. -
list(
) → Encodable< List< T> > -
Available on Encodable<
Returns an Encodable that can encode a list ofT> , provided by the AsListEncodable extensionT
. -
list(
) → Decodable< List< T> > -
Available on Decodable<
Returns a Decodable object that can decode a list ofT> , provided by the AsListDecodable extensionT
. -
list(
) → Codable< List< T> > -
Available on Codable<
Returns a Codable that can encode and decode a list ofT> , provided by the AsListCodable extensionT
. -
map<
K> ([Codable< K> ? keyCodable]) → Codable<Map< K, T> > -
Available on Codable<
Returns a Codable that can encode and decode a map ofT> , provided by the AsMapCodable extensionK
andT
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
) → Codable< Set< T> > -
Available on Codable<
Returns a Codable that can encode and decode a set ofT> , provided by the AsSetCodable extensionT
. -
set(
) → Decodable< Set< T> > -
Available on Decodable<
Returns a Decodable object that can decode a set ofT> , provided by the AsSetDecodable extensionT
. -
set(
) → Encodable< Set< T> > -
Available on Encodable<
Returns an Encodable that can encode a set ofT> , provided by the AsSetEncodable extensionT
. -
stream(
) → Decodable< Stream< T> > -
Available on Decodable<
Returns a Decodable object that can decode a stream ofT> , provided by the AsAsyncDecodable extensionT
. -
stream(
) → Encodable< Stream< T> > -
Available on Encodable<
Returns an Encodable that can encode a stream ofT> , provided by the AsFutureEncodable extensionT
. -
stream(
) → LazyCodable< Stream< T> > -
Available on Codable<
Returns a Codable that can encode and decode a stream ofT> , provided by the AsAsyncCodable extensionT
. -
toCsv(
Iterable< T> value) → String -
Available on Encodable<
Encodes a list of objects into a CSV string.T> , provided by the CsvEncodable extension -
toCsvBytes(
Iterable< T> value) → List<int> -
Available on Encodable<
T> , provided by the CsvEncodable extension -
toJson(
T value) → String -
Available on Encodable<
T> , provided by the JsonEncodable extension -
toJsonBytes(
T value) → List< int> -
Available on Encodable<
T> , provided by the JsonEncodable extension -
toMap(
T value) → Map< String, dynamic> -
Available on Encodable<
T> , provided by the StandardEncodable extension -
toMsgPack(
T value) → List< int> -
Available on Encodable<
T> , provided by the MsgPackEncodable extension -
toProgressiveJson(
T value) → List< int> -
Available on Encodable<
T> , provided by the ProgressiveJsonEncodable extension -
toProgressiveJsonStream(
T value) → Stream< List< int> > -
Available on Encodable<
Encodes the value to a Stream of progressive JSON bytes.T> , provided by the ProgressiveJsonEncodable extension -
toString(
) → String -
A string representation of this object.
inherited
-
toValue(
T value) → Object? -
Available on Encodable<
T> , provided by the StandardEncodable extension
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
wrap(
Object? value) → SelfEncodable