Pointer<T extends NativeType> class
Represents a pointer into the native C memory. Cannot be extended.
- Inheritance
-
- Object
- NativeType
- Pointer
- Available extensions
- Annotations
-
- @sealed
Constructors
- Pointer.fromAddress(int ptr, [Memory? bindTo])
-
Constructs a pointer from an address.
factory
Properties
- address → int
-
Access to the raw pointer value.
final
- boundMemory → Memory
-
The Memory object this pointer is bound to.
final
- hashCode → int
-
The hash code for a Pointer only depends on its address.
no setteroverride
- is64Bit → bool
-
Available on Pointer<
ReturnsIntPtr> , provided by the IntPtrPointer extensiontrue
if the size of a pointer is 64-bit,false
otherwise.no setter - is64Bit → bool
-
Available on Pointer<
ReturnsPointer< , provided by the PointerPointer extensionT> >true
if the size of a pointer is 64-bit,false
otherwise.no setter - length → int
-
Available on Pointer<
The number of UTF-8 code units in this zero-terminated UTF-8 string.Utf8> , provided by the Utf8Pointer extensionno setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → int?
-
How much memory in bytes the type this pointer points to occupies,
or
null
for @unsized types.final - value ↔ double
-
Available on Pointer<
The double at address.Double> , provided by the DoublePointer extensiongetter/setter pair - value ↔ double
-
Available on Pointer<
The float at address.Float> , provided by the FloatPointer extensiongetter/setter pair - value ↔ int
-
Available on Pointer<
The 8-bit integer atInt8> , provided by the Int8Pointer extensionaddress
.getter/setter pair - value ↔ int
-
Available on Pointer<
The 16-bit integer atInt16> , provided by the Int16Pointer extensionaddress
.getter/setter pair - value ↔ int
-
Available on Pointer<
The 32-bit integer atInt32> , provided by the Int32Pointer extensionaddress
.getter/setter pair - value ↔ int
-
Available on Pointer<
The 64-bit integer atInt64> , provided by the Int64Pointer extensionaddress
.getter/setter pair - value ↔ int
-
Available on Pointer<
The 32-bit or 64-bit value atIntPtr> , provided by the IntPtrPointer extensionaddress
.getter/setter pair -
value
↔ Pointer<
T> -
Available on Pointer<
The pointer atPointer< , provided by the PointerPointer extensionT> >address
.getter/setter pair - value ↔ int
-
Available on Pointer<
The 8-bit unsigned integer atUint8> , provided by the Uint8Pointer extensionaddress
.getter/setter pair - value ↔ int
-
Available on Pointer<
The 16-bit unsigned integer atUint16> , provided by the Uint16Pointer extensionaddress
.getter/setter pair - value ↔ int
-
Available on Pointer<
The 32-bit unsigned integer atUint32> , provided by the Uint32Pointer extensionaddress
.getter/setter pair - value ↔ int
-
Available on Pointer<
The 64-bit unsigned integer atUint64> , provided by the Uint64Pointer extensionaddress
.getter/setter pair
Methods
-
asFunction<
DF extends Function> () → DF -
Available on Pointer<
Convert to Dart function, automatically marshalling the arguments and return value.NativeFunction< , provided by the NativeFunctionPointer extensionNF> > -
asTypedList(
int length) → 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) → 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) → 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) → 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) → 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) → 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) → 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) → 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) → 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) → 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> - Casts this pointer to an other type.
-
elementAt(
int index) → Pointer< T> - Pointer arithmetic (takes element size into account).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDartString(
{int? length}) → String -
Available on Pointer<
Converts this UTF-8 encoded string to a Dart string.Utf8> , provided by the Utf8Pointer extension -
toString(
) → String -
A string representation of this object.
inherited
-
viewSingle(
int index) → ByteData -
Returns a view of a single element at
index
(takes element size into account).
Operators
-
operator ==(
Object other) → bool -
Two pointers are equal if their address is the same, independently
of their type argument and of the memory they are bound to.
override
-
operator [](
int index) → double -
Available on Pointer<
The double atDouble> , provided by the DoublePointer extensionaddress + size * index
. -
operator [](
int index) → double -
Available on Pointer<
The float atFloat> , provided by the FloatPointer extensionaddress + size * index
. -
operator [](
int index) → int -
Available on Pointer<
The 8-bit integer atInt8> , provided by the Int8Pointer extensionaddress + size * index
. -
operator [](
int index) → int -
Available on Pointer<
The 16-bit integer atInt16> , provided by the Int16Pointer extensionaddress + size * index
. -
operator [](
int index) → int -
Available on Pointer<
The 32-bit integer atInt32> , provided by the Int32Pointer extensionaddress + size * index
. -
operator [](
int index) → int -
Available on Pointer<
The 64-bit integer atInt64> , provided by the Int64Pointer extensionaddress + size * index
. -
operator [](
int index) → int -
Available on Pointer<
The 32-bit or 64-bit integer atIntPtr> , provided by the IntPtrPointer extensionaddress + size * index
. -
operator [](
int index) → Pointer< T> -
Available on Pointer<
The pointer atPointer< , provided by the PointerPointer extensionT> >address + size * index
. -
operator [](
int index) → int -
Available on Pointer<
The 8-bit unsigned integer atUint8> , provided by the Uint8Pointer extensionaddress + size * index
. -
operator [](
int index) → int -
Available on Pointer<
The 16-bit unsigned integer atUint16> , provided by the Uint16Pointer extensionaddress + size * index
. -
operator [](
int index) → int -
Available on Pointer<
The 32-bit unsigned integer atUint32> , provided by the Uint32Pointer extensionaddress + size * index
. -
operator [](
int index) → int -
Available on Pointer<
The 64-bit unsigned integer atUint64> , provided by the Uint64Pointer extensionaddress + size * index
. -
operator []=(
int index, double value) → void -
Available on Pointer<
Double> , provided by the DoublePointer extension -
operator []=(
int index, double value) → void -
Available on Pointer<
Float> , provided by the FloatPointer extension -
operator []=(
int index, int value) → void -
Available on Pointer<
Int8> , provided by the Int8Pointer extension -
operator []=(
int index, int value) → void -
Available on Pointer<
Int16> , provided by the Int16Pointer extension -
operator []=(
int index, int value) → void -
Available on Pointer<
Int32> , provided by the Int32Pointer extension -
operator []=(
int index, int value) → void -
Available on Pointer<
Int64> , provided by the Int64Pointer extension -
operator []=(
int index, int value) → void -
Available on Pointer<
IntPtr> , provided by the IntPtrPointer extension -
operator []=(
int index, Pointer< T> value) → void -
Available on Pointer<
Pointer< , provided by the PointerPointer extensionT> > -
operator []=(
int index, int value) → void -
Available on Pointer<
Uint8> , provided by the Uint8Pointer extension -
operator []=(
int index, int value) → void -
Available on Pointer<
Uint16> , provided by the Uint16Pointer extension -
operator []=(
int index, int value) → void -
Available on Pointer<
Uint32> , provided by the Uint32Pointer extension -
operator []=(
int index, int value) → void -
Available on Pointer<
Uint64> , provided by the Uint64Pointer extension