WebIndexedDbBytesFile class final

A BytesFile backed by records in one shared IndexedDB object store.

Properties

chunkSize → int
Fixed chunk size in bytes.
final
exists → bool
Whether this logical file has metadata in the store.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isClosed → bool
no setter
length → Future<int>
Current logical length in bytes.
no setter
path → String
Logical path.
final
readOnly → bool
Whether mutations are rejected.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
supportsConcurrentReads → bool
Whether concurrent positional reads are safe.
no setter

Methods

append(Uint8List src, {int start = 0, int? end}) → Future<int>
Appends to the end.
close() → Future<void>
Closes the file; further operations throw StateError.
delete() → Future<void>
Closes and deletes the underlying file.
flush() → Future<void>
Flushes pending writes to the backing store.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readAt(int offset, Uint8List dst, {int start = 0, int? end}) → Future<int>
Reads into dst[start..end) at offset. Returns bytes read (0 at EOF).
toString() → String
A string representation of this object.
override
truncate(int newLength) → Future<void>
Changes the logical length.
writeAt(int offset, Uint8List src, {int start = 0, int? end}) → Future<int>
Writes src[start..end) at offset. Returns bytes written.

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

open(String path, {bool create = true, bool readOnly = false, int chunkSize = kIdbDefaultChunkSize, String databaseName = kIdbDatabaseName, String storeName = kIdbStoreName}) → Future<WebIndexedDbBytesFile>
Opens or creates path in the shared IndexedDB store.