我添加了firebase默认选项(等待firebase . initializeapp (options: DefaultFirebaseOptions.currentPlatform))和firebase_core。
../../software/flutter_linux_3.0.1-stable/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_database_web-0.2.0+15/lib/src/interop/app.dart:35:59: Error: The method
'delete'
isn't defined for the class 'AppJsImpl'.
[ +3 ms] - 'AppJsImpl' is from 'package:firebase_database_web/src/interop/app_interop.dart'
('../../software/flutter_linux_3.0.1-stable/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_database_web-0.2.0+15/lib/src/interop/app_interop.dart').
[ ] Try correcting the name to the name of an existing method, or defining a method named 'delete'.
[ ] Future delete() => core_interop.handleThenable(jsObject.delete());
addfirebase_database_web: ^0.2.1
到pubspec。Yaml解决了这个问题!