Variant class

A struct enum variant with either named (struct) or unnamed (tuple struct) fields.

Constructors

Variant.new({required int index, required String name, required List<Field> fields, required List<String> docs})
Creates a new variant.
const

Properties

docs List<String>
Documentation
final
fields List<Field>
The fields of the variant.
final
hashCode int
The hash code for this object.
no setterinherited
index int
Index of the variant, used in parity-scale-codec.
final
name String
The name of the variant.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited
typeDependencies() Set<int>

Operators

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

Constants

codec → const $VariantCodec