I develop the flutter app connected with Firebase.
The app work well on mobile devices, but when i try to build web i get this error:
/D:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_database_web-0.1.2/lib/src/interop/app.dart:35:59: Error: The method 'delete' isn't defined for the class 'AppJsImpl'.
- 'AppJsImpl' is from 'package:firebase_database_web/src/interop/app_interop.dart' ('/D:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_database_web-0.1.2/lib/src/interop/app_interop.dart').
package:firebase_database_web/…/interop/app_interop.dart:1
Try correcting the name to the name of an existing method, or defining a method named 'delete'.
Future delete() => core_interop.handleThenable(jsObject.delete());
I tried to put firebase_database_web: ^0.1.2+1
in pubspec.yaml, but error is still here.
Did someone have the same problem, and how are you fixed?
Thanks
2
Answers
I have tackled the issue by adding a row in the "app_interop.dart" file.
Before:
After:
Add the latest version of firebase_database_web to your pubspec.yaml
Fixed it for me.