Array<T extends NativeType>.variableMulti constructor
- @Since('3.6')
Annotation to a variable length Array in Structs.
final class MyStruct extends Struct {
@Array.variableMulti([2, 2])
external Array<Array<Array<Uint8>>> threeDimensionalInlineArray;
}
final class MyStruct2 extends Struct {
@Array.variableMulti(variableDimension: 1, [2, 2, 2])
external Array<Array<Array<Array<Uint8>>>> fourDimensionalInlineArray;
}
final class MyStruct3 extends Struct {
@Array.variableMulti([2, 2, 2, 2, 2, 2, 2])
external Array<Array<Array<Array<Array<Array<Array<Array<Uint8>>>>>>>> eightDimensionalInlineArray;
}
The variable length is always the outermost dimension of the array.
variableDimension
is the outermost dimension of the variable length
array (defaults to zero (0
)). When variableDimension
is set to a value
greater than zero (0
), the last field of the struct is taken into
account in sizeOf and AllocatorAlloc.call.
Do not invoke in normal code.
Implementation
@Since('3.6')
const factory Array.variableMulti(
List<int> dimensions, {
@Since('3.7') int variableDimension,
}) = _ArraySize<T>.variableMulti;