startWebWorker function
CAUTION: THIS FILE NEEDS TO BE MANUALLY COMPILED
- in your project, create a file
web/web_worker.dart
- add the following contents:
import 'package:hive/hive.dart';
Future<void> main() => startWebWorker();
- compile the file using:
dart compile js -o web/web_worker.dart.js -m web/web_worker.dart
You should not check in that file into your VCS. Instead, you should compile the web worker in your CI pipeline.
Implementation
Future<void> startWebWorker() => Future.value();