registerVirtualFileSystem method

void registerVirtualFileSystem(
  1. VirtualFileSystem vfs, {
  2. bool makeDefault = false,
})

Registers a custom virtual file system used by this sqlite3 instance to emulate I/O functionality that is not supported through WASM directly.

Implementing a suitable VirtualFileSystem is a complex task. Users of this package on the web should consider using a package that calls this method for them (like drift or sqflite_common_ffi_web). For more information on how to implement this, see the readme of the sqlite3 package for details.

Implementation

void registerVirtualFileSystem(VirtualFileSystem vfs,
    {bool makeDefault = false}) {
  (bindings as WasmSqliteBindings)
      .registerVirtualFileSystem(vfs, makeDefault ? 1 : 0);
}