Slice class
A contiguous area of native memory, whose lifetime is tied to some other object.
Slices are expected to be immutable.
On the nativ side, results which are typed as a slice and may have no value,
represent this with the null slice. In Dart, these results are typed as
nullable and are represented with null
.
- Implemented types
- Implementers
Constructors
- Slice.fromSlice(Slice slice)
-
Creates a Slice which points to the same data as
slice
.
Properties
Methods
-
asTypedList(
) → Uint8List - Returns a Uint8List that is a mutable view of this Slice.
-
compareTo(
Slice other) → int -
Compares this slice lexicographically to
other
. -
flSlice(
[Allocator allocator = malloc]) → Pointer< FLSlice> - Allocates a FLSlice sets it to this slice.
-
makeGlobal(
) → Pointer< FLSlice> - Sets the globalFLSlice to this slice and returns it.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDartString(
) → String - Interprets the data of this slice as an UTF-8 encoded string.
-
toString(
) → String -
A string representation of this object.
override
-
toTypedList(
) → Uint8List - Copies the contents of this Slice into a new Uint8List and returns it.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromFLSlice(
FLSlice slice) → Slice? -
Creates a Slice which points to the same data as
slice
. -
fromFLString(
FLString string) → Slice? -
Creates a Slice which points to the same data as
string
.