NitroTuple class
Marks a Dart 3 positional record typedef as a named tuple type.
Annotate a typedef whose aliased type is a Dart 3 positional record
(T1, T2, ...). The generator emits encode/decode helpers that bridge
the positional record across the C FFI boundary using the same binary
codec as @HybridRecord — sequential field writes with a 4-byte length
prefix. Fields are accessed via $1, $2, ... on the Dart side.
Wire format: [4B len][field1 bytes][field2 bytes]... (same as @HybridRecord)
Dart: (T1, T2, ...) positional record
C: uint8_t* (same as @HybridRecord)
Kotlin: data class Name(val field0: T0, val field1: T1, ...)
Swift: struct Name { var field0: T0; var field1: T1; ... }
Example:
@NitroTuple()
typedef MyPair = (int, String);
@NitroModule(...)
abstract class Counter {
MyPair getPair();
void setPair(MyPair v);
}
Constructors
- NitroTuple()
-
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
Methods
-
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