StructPointer<T extends Struct> extension

Extension on Pointer specialized for the type argument Struct.

on
Annotations
  • @Since('2.12')

Properties

ref ↔ T

Available on Pointer<T>, provided by the StructPointer extension

A Dart view of the struct referenced by this pointer.
getter/setter pair

Methods

elementAt(int index) Pointer<T>

Available on Pointer<T>, provided by the StructPointer extension

Pointer arithmetic (takes element size into account)

Operators

operator +(int offset) Pointer<T>

Available on Pointer<T>, provided by the StructPointer extension

A pointer to the offsetth T after this one.
operator -(int offset) Pointer<T>

Available on Pointer<T>, provided by the StructPointer extension

A pointer to the offsetth T before this one.
operator [](int index) → T

Available on Pointer<T>, provided by the StructPointer extension

Creates a reference to access the fields of this struct backed by native memory at address + sizeOf<T>() * index.
operator []=(int index, T value) → void

Available on Pointer<T>, provided by the StructPointer extension

Copies the value struct into native memory, starting at address * sizeOf<T>() * index.