Mixin for variant types that support layout-based serialization.
- Implemented types
- Implementers
Constructors
- VariantLayoutSerializable()
-
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
- variantName → String
-
Returns the name of the variant.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toLayout(
{String? property}) → Layout< Map< String, dynamic> > -
Converts the object into a Layout for serialization.
inherited
-
toSerializeBytes(
{String? property}) → List< int> -
Serializes the variant to bytes.
override
-
toSerializeJson(
) → Map< String, dynamic> -
Serializes the object to JSON.
inherited
-
toSerializeVariantBytes(
) → List< int> - Serializes the variant to JSON.
-
toSerializeVariantJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
-
toVariantLayout(
{String? property}) → Layout< Map< String, dynamic> > - Converts the variant to its Layout representation.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
deserialize(
{required List< int> bytes, required Layout<Map< layout}) → Map<String, dynamic> >String, dynamic> -
Deserializes bytes into a JSON map for the variant.
override
-
toVariantDecodeResult(
Map< String, dynamic> json) → VariantDeserializeResult - Converts a JSON map into a VariantDeserializeResult.