Pointer< T extends NativeType> class
final
Represents a pointer into the native C memory. Cannot be extended.
Constructors
- Pointer.fromAddress(int ptr)
-
Construction from raw integer.
factory
Properties
- address → int
-
Access to the raw pointer value.
On 32-bit systems, the upper 32-bits of the result are 0.
no setter
- hashCode → int
-
The hash code for a Pointer only depends on its address.
no setteroverride
- ref ↔ T
-
Available on Pointer<
A Dart view of the struct referenced by this pointer.T>, provided by the StructPointer extension getter/setter pair - ref ↔ T
-
Available on Pointer<
A Dart view of the union referenced by this pointer.T>, provided by the UnionPointer extension getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ int
-
Available on Pointer<
The integer at address.T>, provided by the AbiSpecificIntegerPointer extension getter/setter pair - value ↔ bool
-
Available on Pointer<
The bool at address.Bool>, provided by the BoolPointer extension getter/setter pair - value ↔ double
-
Available on Pointer<
The double at address.Double>, provided by the DoublePointer extension getter/setter pair - value ↔ double
-
Available on Pointer<
The float at address.Float>, provided by the FloatPointer extension getter/setter pair - value ↔ int
-
Available on Pointer<
The 8-bit two's complement integer at address.Int8>, provided by the Int8Pointer extension getter/setter pair - value ↔ int
-
Available on Pointer<
The 16-bit two's complement integer at address.Int16>, provided by the Int16Pointer extension getter/setter pair - value ↔ int
-
Available on Pointer<
The 32-bit two's complement integer at address.Int32>, provided by the Int32Pointer extension getter/setter pair - value ↔ int
-
Available on Pointer<
The 64-bit two's complement integer at address.Int64>, provided by the Int64Pointer extension getter/setter pair -
value
↔ Pointer<
T> -
Available on Pointer<
The pointer at address.Pointer< T>>, provided by the PointerPointer extension getter/setter pair - value ↔ int
-
Available on Pointer<
The 8-bit unsigned integer at address.Uint8>, provided by the Uint8Pointer extension getter/setter pair - value ↔ int
-
Available on Pointer<
The 16-bit unsigned integer at address.Uint16>, provided by the Uint16Pointer extension getter/setter pair - value ↔ int
-
Available on Pointer<
The 32-bit unsigned integer at address.Uint32>, provided by the Uint32Pointer extension getter/setter pair - value ↔ int
-
Available on Pointer<
The 64-bit unsigned integer at address.Uint64>, provided by the Uint64Pointer extension getter/setter pair
Methods
-
asFunction<
@DartRepresentationOf('NF') DF extends Function>( {bool isLeaf = false}) → DF -
Available on Pointer<
Convert to Dart function, automatically marshalling the arguments and return value.NativeFunction< NF>>, provided by the NativeFunctionPointer extension -
asTypedList(
int length, {Pointer< NativeFinalizerFunction>? finalizer, Pointer< Void>? token}) → Float64List -
Available on Pointer<
Creates a typed list view backed by memory in the address space.Double>, provided by the DoublePointer extension -
asTypedList(
int length, {Pointer< NativeFinalizerFunction>? finalizer, Pointer< Void>? token}) → Float32List -
Available on Pointer<
Creates a typed list view backed by memory in the address space.Float>, provided by the FloatPointer extension -
asTypedList(
int length, {Pointer< NativeFinalizerFunction>? finalizer, Pointer< Void>? token}) → Int8List -
Available on Pointer<
Creates a typed list view backed by memory in the address space.Int8>, provided by the Int8Pointer extension -
asTypedList(
int length, {Pointer< NativeFinalizerFunction>? finalizer, Pointer< Void>? token}) → Int16List -
Available on Pointer<
Creates a typed list view backed by memory in the address space.Int16>, provided by the Int16Pointer extension -
asTypedList(
int length, {Pointer< NativeFinalizerFunction>? finalizer, Pointer< Void>? token}) → Int32List -
Available on Pointer<
Creates a typed list view backed by memory in the address space.Int32>, provided by the Int32Pointer extension -
asTypedList(
int length, {Pointer< NativeFinalizerFunction>? finalizer, Pointer< Void>? token}) → Int64List -
Available on Pointer<
Creates a typed list view backed by memory in the address space.Int64>, provided by the Int64Pointer extension -
asTypedList(
int length, {Pointer< NativeFinalizerFunction>? finalizer, Pointer< Void>? token}) → Uint8List -
Available on Pointer<
Creates a typed list view backed by memory in the address space.Uint8>, provided by the Uint8Pointer extension -
asTypedList(
int length, {Pointer< NativeFinalizerFunction>? finalizer, Pointer< Void>? token}) → Uint16List -
Available on Pointer<
Creates a typed list view backed by memory in the address space.Uint16>, provided by the Uint16Pointer extension -
asTypedList(
int length, {Pointer< NativeFinalizerFunction>? finalizer, Pointer< Void>? token}) → Uint32List -
Available on Pointer<
Creates a typed list view backed by memory in the address space.Uint32>, provided by the Uint32Pointer extension -
asTypedList(
int length, {Pointer< NativeFinalizerFunction>? finalizer, Pointer< Void>? token}) → Uint64List -
Available on Pointer<
Creates a typed list view backed by memory in the address space.Uint64>, provided by the Uint64Pointer extension -
cast<
U extends NativeType>( ) → Pointer< U> -
Reinterprets the address of this pointer as the address of a
U
. -
elementAt(
int index) → Pointer< T> -
Available on Pointer<
Pointer arithmetic (takes element size into account).T>, provided by the AbiSpecificIntegerPointer extension -
elementAt(
int index) → Pointer< Bool> -
Available on Pointer<
Pointer arithmetic (takes element size into account).Bool>, provided by the BoolPointer extension -
elementAt(
int index) → Pointer< Double> -
Available on Pointer<
Pointer arithmetic (takes element size into account).Double>, provided by the DoublePointer extension -
elementAt(
int index) → Pointer< Float> -
Available on Pointer<
Pointer arithmetic (takes element size into account).Float>, provided by the FloatPointer extension -
elementAt(
int index) → Pointer< Int8> -
Available on Pointer<
Pointer arithmetic (takes element size into account).Int8>, provided by the Int8Pointer extension -
elementAt(
int index) → Pointer< Int16> -
Available on Pointer<
Pointer arithmetic (takes element size into account).Int16>, provided by the Int16Pointer extension -
elementAt(
int index) → Pointer< Int32> -
Available on Pointer<
Pointer arithmetic (takes element size into account).Int32>, provided by the Int32Pointer extension -
elementAt(
int index) → Pointer< Int64> -
Available on Pointer<
Pointer arithmetic (takes element size into account).Int64>, provided by the Int64Pointer extension -
elementAt(
int index) → Pointer< Pointer< T>> -
Available on Pointer<
Pointer arithmetic (takes element size into account).Pointer< T>>, provided by the PointerPointer extension -
elementAt(
int index) → Pointer< T> -
Available on Pointer<
Pointer arithmetic (takes element size into account)T>, provided by the StructPointer extension -
elementAt(
int index) → Pointer< Uint8> -
Available on Pointer<
Pointer arithmetic (takes element size into account).Uint8>, provided by the Uint8Pointer extension -
elementAt(
int index) → Pointer< Uint16> -
Available on Pointer<
Pointer arithmetic (takes element size into account).Uint16>, provided by the Uint16Pointer extension -
elementAt(
int index) → Pointer< Uint32> -
Available on Pointer<
Pointer arithmetic (takes element size into account).Uint32>, provided by the Uint32Pointer extension -
elementAt(
int index) → Pointer< Uint64> -
Available on Pointer<
Pointer arithmetic (takes element size into account).Uint64>, provided by the Uint64Pointer extension -
elementAt(
int index) → Pointer< T> -
Available on Pointer<
Pointer arithmetic (takes element size into account).T>, provided by the UnionPointer extension -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refWithFinalizer(
Pointer< NativeFinalizerFunction> finalizer, {Pointer< Void>? token}) → T -
Available on Pointer<
A Dart view of the struct referenced by this pointer.T>, provided by the StructPointer extension -
refWithFinalizer(
Pointer< NativeFinalizerFunction> finalizer, {Pointer< Void>? token}) → T -
Available on Pointer<
A Dart view of the union referenced by this pointer.T>, provided by the UnionPointer extension -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator +(
int offset) → Pointer< T> -
Available on Pointer<
A pointer to theT>, provided by the UnionPointer extension offset
thT
after this one. -
operator +(
int offset) → Pointer< T> -
Available on Pointer<
A pointer to theT>, provided by the AbiSpecificIntegerPointer extension offset
thT
after this one. -
operator +(
int offset) → Pointer< Bool> -
Available on Pointer<
A pointer to theBool>, provided by the BoolPointer extension offset
th Bool after this one. -
operator +(
int offset) → Pointer< Double> -
Available on Pointer<
A pointer to theDouble>, provided by the DoublePointer extension offset
th Double after this one. -
operator +(
int offset) → Pointer< Float> -
Available on Pointer<
A pointer to theFloat>, provided by the FloatPointer extension offset
th Float after this one. -
operator +(
int offset) → Pointer< Int8> -
Available on Pointer<
A pointer to theInt8>, provided by the Int8Pointer extension offset
th Int8 after this one. -
operator +(
int offset) → Pointer< Int16> -
Available on Pointer<
A pointer to theInt16>, provided by the Int16Pointer extension offset
th Int16 after this one. -
operator +(
int offset) → Pointer< Int32> -
Available on Pointer<
A pointer to theInt32>, provided by the Int32Pointer extension offset
th Int32 after this one. -
operator +(
int offset) → Pointer< Int64> -
Available on Pointer<
A pointer to theInt64>, provided by the Int64Pointer extension offset
th Int64 after this one. -
operator +(
int offset) → Pointer< Pointer< T>> -
Available on Pointer<
A pointer to thePointer< T>>, provided by the PointerPointer extension offset
th Pointer<T> after this one. -
operator +(
int offset) → Pointer< T> -
Available on Pointer<
A pointer to theT>, provided by the StructPointer extension offset
thT
after this one. -
operator +(
int offset) → Pointer< Uint8> -
Available on Pointer<
A pointer to theUint8>, provided by the Uint8Pointer extension offset
th Uint8 after this one. -
operator +(
int offset) → Pointer< Uint16> -
Available on Pointer<
A pointer to theUint16>, provided by the Uint16Pointer extension offset
th Uint16 after this one. -
operator +(
int offset) → Pointer< Uint32> -
Available on Pointer<
A pointer to theUint32>, provided by the Uint32Pointer extension offset
th Uint32 after this one. -
operator +(
int offset) → Pointer< Uint64> -
Available on Pointer<
A pointer to theUint64>, provided by the Uint64Pointer extension offset
th Uint64 after this one. -
operator -(
int offset) → Pointer< T> -
Available on Pointer<
A pointer to theT>, provided by the StructPointer extension offset
thT
before this one. -
operator -(
int offset) → Pointer< Uint32> -
Available on Pointer<
A pointer to theUint32>, provided by the Uint32Pointer extension offset
th Uint32 before this one. -
operator -(
int offset) → Pointer< Uint8> -
Available on Pointer<
A pointer to theUint8>, provided by the Uint8Pointer extension offset
th Uint8 before this one. -
operator -(
int offset) → Pointer< Int16> -
Available on Pointer<
A pointer to theInt16>, provided by the Int16Pointer extension offset
th Int16 before this one. -
operator -(
int offset) → Pointer< Int32> -
Available on Pointer<
A pointer to theInt32>, provided by the Int32Pointer extension offset
th Int32 before this one. -
operator -(
int offset) → Pointer< Float> -
Available on Pointer<
A pointer to theFloat>, provided by the FloatPointer extension offset
th Float before this one. -
operator -(
int offset) → Pointer< Bool> -
Available on Pointer<
A pointer to theBool>, provided by the BoolPointer extension offset
th Bool before this one. -
operator -(
int offset) → Pointer< Int64> -
Available on Pointer<
A pointer to theInt64>, provided by the Int64Pointer extension offset
th Int64 before this one. -
operator -(
int offset) → Pointer< Pointer< T>> -
Available on Pointer<
A pointer to thePointer< T>>, provided by the PointerPointer extension offset
th Pointer<T> before this one. -
operator -(
int offset) → Pointer< Int8> -
Available on Pointer<
A pointer to theInt8>, provided by the Int8Pointer extension offset
th Int8 before this one. -
operator -(
int offset) → Pointer< T> -
Available on Pointer<
A pointer to theT>, provided by the UnionPointer extension offset
thT
before this one. -
operator -(
int offset) → Pointer< T> -
Available on Pointer<
A pointer to theT>, provided by the AbiSpecificIntegerPointer extension offset
thT
before this one. -
operator -(
int offset) → Pointer< Uint64> -
Available on Pointer<
A pointer to theUint64>, provided by the Uint64Pointer extension offset
th Uint64 before this one. -
operator -(
int offset) → Pointer< Uint16> -
Available on Pointer<
A pointer to theUint16>, provided by the Uint16Pointer extension offset
th Uint16 before this one. -
operator -(
int offset) → Pointer< Double> -
Available on Pointer<
A pointer to theDouble>, provided by the DoublePointer extension offset
th Double before this one. -
operator ==(
Object other) → bool -
Equality for Pointers only depends on their address.
override
-
operator [](
int index) → double -
Available on Pointer<
The float atFloat>, provided by the FloatPointer extension address + sizeOf<Float>() * index
. -
operator [](
int index) → bool -
Available on Pointer<
The bool atBool>, provided by the BoolPointer extension address + sizeOf<Bool>() * index
. -
operator [](
int index) → int -
Available on Pointer<
The 64-bit two's complement integer atInt64>, provided by the Int64Pointer extension address + sizeOf<Int64>() * index
. -
operator [](
int index) → int -
Available on Pointer<
The 16-bit two's complement integer atInt16>, provided by the Int16Pointer extension address + sizeOf<Int16>() * index
. -
operator [](
int index) → Pointer< T> -
Available on Pointer<
Load a Dart value from this location offset byPointer< T>>, provided by the PointerPointer extension index
. -
operator [](
int index) → int -
Available on Pointer<
The 32-bit unsigned integer atUint32>, provided by the Uint32Pointer extension address + sizeOf<Uint32>() * index
. -
operator [](
int index) → double -
Available on Pointer<
The double atDouble>, provided by the DoublePointer extension address + sizeOf<Double>() * index
. -
operator [](
int index) → int -
Available on Pointer<
The 8-bit two's complement integer atInt8>, provided by the Int8Pointer extension address + sizeOf<Int8>() * index
. -
operator [](
int index) → T -
Available on Pointer<
Creates a reference to access the fields of this struct backed by native memory atT>, provided by the StructPointer extension address + sizeOf<T>() * index
. -
operator [](
int index) → T -
Available on Pointer<
Creates a reference to access the fields of this union backed by native memory atT>, provided by the UnionPointer extension address + sizeOf<T>() * index
. -
operator [](
int index) → int -
Available on Pointer<
The 32-bit two's complement integer atInt32>, provided by the Int32Pointer extension address + sizeOf<Int32>() * index
. -
operator [](
int index) → int -
Available on Pointer<
The 8-bit unsigned integer atUint8>, provided by the Uint8Pointer extension address + sizeOf<Uint8>() * index
. -
operator [](
int index) → int -
Available on Pointer<
The integer atT>, provided by the AbiSpecificIntegerPointer extension address + sizeOf<T>() * index
. -
operator [](
int index) → int -
Available on Pointer<
The 64-bit unsigned integer atUint64>, provided by the Uint64Pointer extension address + sizeOf<Uint64>() * index
. -
operator [](
int index) → int -
Available on Pointer<
The 16-bit unsigned integer atUint16>, provided by the Uint16Pointer extension address + sizeOf<Uint16>() * index
. -
operator []=(
int index, int value) → void -
Available on Pointer<
The 16-bit unsigned integer atUint16>, provided by the Uint16Pointer extension address + sizeOf<Uint16>() * index
. -
operator []=(
int index, int value) → void -
Available on Pointer<
The 8-bit unsigned integer atUint8>, provided by the Uint8Pointer extension address + sizeOf<Uint8>() * index
. -
operator []=(
int index, T value) → void -
Available on Pointer<
Copies theT>, provided by the StructPointer extension value
struct into native memory, starting ataddress * sizeOf<T>() * index
. -
operator []=(
int index, Pointer< T> value) → void -
Available on Pointer<
Store a Dart value into this location offset byPointer< T>>, provided by the PointerPointer extension index
. -
operator []=(
int index, int value) → void -
Available on Pointer<
The 32-bit unsigned integer atUint32>, provided by the Uint32Pointer extension address + sizeOf<Uint32>() * index
. -
operator []=(
int index, int value) → void -
Available on Pointer<
The integer atT>, provided by the AbiSpecificIntegerPointer extension address + sizeOf<T>() * index
. -
operator []=(
int index, double value) → void -
Available on Pointer<
The double atDouble>, provided by the DoublePointer extension address + sizeOf<Double>() * index
. -
operator []=(
int index, int value) → void -
Available on Pointer<
The 32-bit two's complement integer atInt32>, provided by the Int32Pointer extension address + sizeOf<Int32>() * index
. -
operator []=(
int index, int value) → void -
Available on Pointer<
The 64-bit unsigned integer atUint64>, provided by the Uint64Pointer extension address + sizeOf<Uint64>() * index
. -
operator []=(
int index, double value) → void -
Available on Pointer<
The float atFloat>, provided by the FloatPointer extension address + sizeOf<Float>() * index
. -
operator []=(
int index, int value) → void -
Available on Pointer<
The 16-bit two's complement integer atInt16>, provided by the Int16Pointer extension address + sizeOf<Int16>() * index
. -
operator []=(
int index, int value) → void -
Available on Pointer<
The 8-bit two's complement integer atInt8>, provided by the Int8Pointer extension address + sizeOf<Int8>() * index
. -
operator []=(
int index, T value) → void -
Available on Pointer<
Copies theT>, provided by the UnionPointer extension value
union into native memory, starting ataddress * sizeOf<T>() * index
. -
operator []=(
int index, bool value) → void -
Available on Pointer<
The bool atBool>, provided by the BoolPointer extension address + sizeOf<Bool>() * index
. -
operator []=(
int index, int value) → void -
Available on Pointer<
The 64-bit two's complement integer atInt64>, provided by the Int64Pointer extension address + sizeOf<Int64>() * index
.
Static Methods
-
fromFunction<
T extends Function>( Function f, [Object? exceptionalReturn]) → Pointer< NativeFunction< T>> - Convert Dart function to a C function pointer, automatically marshalling the arguments and return value