SimplePlatformCodec<T extends Object> class
- Inheritance
-
- Object
- PlatformCodec<
T> - SimplePlatformCodec
Constructors
-
SimplePlatformCodec({List<
PlatformFormat> ? formats, List<PlatformFormat> ? encodingFormats, List<PlatformFormat> ? decodingFormats, Future<T?> onDecode(PlatformDataProvider dataProvider, PlatformFormat format)?, FutureOr<Object?> onEncode(T value, PlatformFormat format)?}) -
const
Properties
-
decodingFormats
→ List<
PlatformFormat> -
no setteroverride
-
encodingFormats
→ List<
PlatformFormat> -
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onDecode
→ Future<
T?> Function(PlatformDataProvider dataProvider, PlatformFormat format)? -
final
-
onEncode
→ FutureOr<
Object?> Function(T value, PlatformFormat format)? -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
decode(
PlatformDataProvider dataProvider, PlatformFormat format) → Future< T?> -
Decodes the data from platform representation.
Returns
nullif decoding failed.override -
encode(
T value, PlatformFormat format) → FutureOr< Object?> -
Encodes the data to platform representation. By default this
is a simple passthrough function.
override
-
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