Is your feature request related to a problem? Please describe.
I'm trying to get my flutter app working in the browser and it depends on firebase_database. I've set up my index.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Flutter WebRTC Demo</title>
</head>
<body>
<script src="https://www.gstatic.com/firebasejs/7.6.1/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.6.1/firebase-database.js"></script>
<script>
const firebaseConfig = {
apiKey: '...',
authDomain: '...',
databaseURL: '...',
projectId: '...',
storageBucket: '...',
messagingSenderId: '...',
appId: '...'
};
firebase.initializeApp(firebaseConfig);
</script>
<script src="main.dart.js" type="application/javascript"></script>
</body>
</html>
But, when I try to use the firebase database, I get errors in the logs:
MissingPluginException(No implementation found for method DatabaseReference#set on channel plugins.flutter.io/firebase_database)
package:dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 196:49 throw_
package:flutter/src/services/platform_channel.dart 319:7 invokeMethod
package:dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 47:50 onValue
package:dart-sdk/lib/async/zone.dart 1381:54 runUnary
package:dart-sdk/lib/async/future_impl.dart 139:18 handleValue
package:dart-sdk/lib/async/future_impl.dart 680:44 handleValueCallback
package:dart-sdk/lib/async/future_impl.dart 709:32 _propagateToListeners
package:dart-sdk/lib/async/future_impl.dart 524:5 [_completeWithValue]
package:dart-sdk/lib/async/future_impl.dart 554:7 callback
package:dart-sdk/lib/async/schedule_microtask.dart 43:11 _microtaskLoop
package:dart-sdk/lib/async/schedule_microtask.dart 52:5 _startMicrotaskLoop
package:dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 168:15 <fn>
Describe the solution you'd like
Documentation for how I can set firebase_database up properly. I'd be happy to write the documentation if I find a solution :)
I see @ditman recently did a documentation PR for firebase_core and fire_base auth. Are these the only flutterfire packages that are supported in web so far?
Semi related stack overflow question: https://stackoverflow.com/questions/59409441/flutter-web-is-it-firebase-analytics-support-in-flutter-web-application
Someone is confused about firebase analytics being supported on web or not. It would be great if we could put a table in the main readme about support. This would include different icons if
Something like this (As I have no idea of what is supported or not, the marks are all incorrect, this is just an example I copy pasted and modified):
| Package | Android | iOS | Web | macOS | Windows | Linux | Fuchsia |
| :-------------: | :-------------:| :-----: | :-----: | :-----: | :-----: | :-----: | :-----: |
| cloud_firestore | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | [WIP] | [WIP] | |
| firebase_admob | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | [WIP] | [WIP] | |
| firebase_analytics | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | |
| firebase_auth | | | | | | | |
| firebase_core | :warning: | :warning: | :heavy_check_mark: | | | | |
| firebase_crashlytics | :warning: | :warning: | :heavy_check_mark: | | | | |
| firebase_database | :warning: | :warning: | :heavy_check_mark: | | | | |
| firebase_dynamic_links | :warning: | :warning: | :heavy_check_mark: | | | | |
| firebase_in_app_messaging | :warning: | :warning: | :heavy_check_mark: | | | | |
| firebase_messaging | :warning: | :warning: | :heavy_check_mark: | | | | |
| firebase_ml_vision | :warning: | :warning: | :heavy_check_mark: | | | | |
| firebase_performance | :warning: | :warning: | :heavy_check_mark: | | | | |
| firebase_remote_config | :warning: | :warning: | :heavy_check_mark: | | | | |
| firebase_storage | :warning: | :warning: | :heavy_check_mark: | | | | |
I see @ditman recently did a documentation PR for firebase_core and fire_base auth. Are these the only flutterfire packages that are supported in web so far?
Yes, and we're currently working on cloud_firestore.
Here's some of the other projects in the roadmap: https://github.com/flutter/flutter/projects/69
Awesome, thank you for the link to the board... and now I also see the "Web?" column in the main readme in the table https://github.com/FirebaseExtended/flutterfire#available-flutterfire-plugins
Closing because there is no firebase_database functionality to document at this time.
I'll make sure firebase_database is in the project board. Thanks for reporting!
_(Created ticket here)_