Update wasm snippet for docs

This commit is contained in:
Simon Binder 2022-05-04 20:46:09 +02:00
parent 9e2e9c47be
commit f971d4ce91
No known key found for this signature in database
GPG Key ID: 7891917E4147B8C0
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ QueryExecutor connect() {
final response = await http.get(Uri.parse('sqlite3.wasm'));
// Create a virtual file system backed by IndexedDb with everything in
// `/drift/my_app/` being persisted.
final fs = await IndexedDbFileSystem.load('/drift/my_app/');
final fs = await IndexedDbFileSystem.open(dbName: 'my_app');
final sqlite3 = await WasmSqlite3.load(
response.bodyBytes,
SqliteEnvironment(fileSystem: fs),

View File

@ -15,7 +15,7 @@ dependencies:
js: ^0.6.3
meta: ^1.3.0
stream_channel: ^2.1.0
sqlite3: ^1.6.2
sqlite3: ^1.7.0
dev_dependencies:
build_test: ^2.0.0