TupleType class final

Tuple type with ordered, unnamed fields accessed by index.

Represents smart contract tuple types with positional elements. Elements are accessed by index.

Inheritance
Available extensions
Annotations
  • @immutable

Constructors

TupleType(List<AbiType> elementTypes, {dynamic metadata})
Creates a Tuple type with element types.

Properties

arity int
Number of elements in this tuple.
no setter
cardinality TypeCardinality
Type cardinality.
finalinherited
classHierarchy List<String>
Returns full class hierarchy from most specific to most general.
no setteroverride
className String
Returns class name for runtime type identification.
no setteroverride
dependencyNames List<String>
Returns type dependency names for this custom type.
no setterinherited
elementTypes List<AbiType>
Types of elements in this tuple.
no setter
fieldDefinitions List<FieldDefinition>
Field definitions for this tuple (auto-generated names like 'field0', 'field1').
final
firstTypeParameter AbiType
Gets first type parameter.
no setterinherited
fullyQualifiedName String
Returns fully qualified name including type parameters.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
hasMetadata bool
Whether type has metadata attached.
no setterinherited
isDynamic bool
Whether type has dynamic (variable) length.
no setterinherited
isDynamic bool

Available on AbiType, provided by the AbiTypeExtensions extension

Returns whether the type has dynamic length.
no setter
isGeneric bool
Whether type is generic (has type parameters).
no setterinherited
metadata → dynamic
Optional metadata.
finalinherited
name String
Type name (e.g., 'u32', 'Address', 'List').
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sizeInBytes int?
Returns byte size if fixed, null if dynamic.
no setterinherited
typeParameters List<AbiType>
Type parameters for generic types.
finalinherited

Methods

canAcceptValue(dynamic nativeValue) bool
Checks if type can accept the given native value.
inherited
createValue(dynamic nativeValue) TypedValue
Creates a TupleValue from native Dart list.
override
createValueOrThrow<T extends TypedValue>(dynamic nativeValue) → T

Available on AbiType, provided by the AbiTypeOrThrowExtensions extension

Creates a TypedValue from native value and ensures it matches expected type.
equals(AbiType other) bool
Checks type equality based on fully qualified names.
inherited
hasClassOrSuperclass(String name) bool
Checks if instance is or extends the specified class.
inherited
hasExactClass(String name) bool
Checks if instance is exactly the specified class.
inherited
isAssignableFrom(AbiType other) bool
Checks if type can be assigned from other type.
inherited
isValidValue(dynamic value) bool

Available on AbiType, provided by the AbiTypeExtensions extension

Checks if the value is valid for this type.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requireType<T extends AbiType>(String message) → T

Available on AbiType, provided by the AbiTypeValidationExtensions extension

Ensures this type is an instance of T, throwing with a custom message if not.
toMap() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited

Operators

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