fix: drift not working on web

This commit is contained in:
PartyDonut 2025-08-08 18:11:40 +02:00
parent fa30e634b4
commit d3505e99b7
4 changed files with 13334 additions and 1 deletions

View file

@ -199,7 +199,10 @@ class AppDatabase extends _$AppDatabase {
native: const DriftNativeOptions(
databaseDirectory: getApplicationSupportDirectory,
),
// If you need web support, see https://drift.simonbinder.eu/platforms/web/
web: DriftWebOptions(
sqlite3Wasm: Uri.parse('sqlite3.wasm'),
driftWorker: Uri.parse('drift_worker.dart.js'),
),
);
}
}