-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[firebase_database] Web support for realtime database #1835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[firebase_database] Web support for realtime database #1835
Conversation
packages/firebase_database/firebase_database/lib/src/database_reference.dart
Outdated
Show resolved
Hide resolved
|
Any progress as to the addition of web support for database? |
|
We are waiting for this! |
|
Will this be done soon ? Does anyone have a work around ? |
|
Sorry for disappearing. I was super busy at work. The current progress of the task is The interface has been built and works fine on mobile but on the web, the referencing is getting overlapped. It's quite complicated for me to have a look and fix it with very little spare time. I'll try to look back again and give a more detailed progress report. If any of you guys wanna share hand then please let me know, let's get this done together, |
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
|
@byrek3d if you're getting MethodChannel errors, it's because your version of the plugin may not be using the platform_interface package that @awazgyawali added here (or that it is not 100% complete) Regards! |
|
@byrek3d I checked the PR back again yesterday. It's working fine for me. I don't know if it's because of Flutter version mismatch. But I would be more than grateful if you tried running the example project that comes along with the repo. |
|
I tested this PR for a week now, and all works great in my project! Thanks for this work. Hope it will be merged soon |
|
Amazing to hear @1g0rrr Is there any issue or missing features that you might have encountered except |
|
@1g0rrr May I ask what changes you made to your current project in oder to get it to run? I added these two in my pubsec.yaml
But now I can't run on the simulator anymore (pod install error, more precisely this:
|
|
@byrek3d Here is how I managed to do this. I copy the whole PR repo, and then deleted unnecessary folders. |
|
Has anyone tested .onDisconnect()? I cannot get a set or a remove operation to complete after the window is closed. |
I think it's now time to move ahead as a lot of fellow developers are waiting on this. I will start the breakdown process from tomorrow. I hope it gets reviewed soon. |
|
The first PR has been published. |
|
Don't mean to give any hurry but my project is heavily relying on this, any idea on when this will be merged? I'm happy to offer help if needed! |
|
@dev-mush I setup a fork that allows you to easily add this to your pubspec while we wait for a PR. |
|
Hi everyone! Last time I was reporting some errors in my project, but I am now certain that it was just my bad when modifying the pubsec.yaml Using what @MichealReed provided was much simpler and worked like a charm. Now my app is partially working on the web, I can see that it reads a list of objects from my firebase database correctly, but when trying to access another list of objects from my database (that's what my app normally does, it's a list of "people" each having different "files") it is crashing. I really can't figure out how to debug on firebase_web, but here is the error output i get: |
|
@byrek3d Can you post a minimal reproducible code. As per thr error message an assertion on this line is failing Also as #2582 is moving hot and I will not probably maintain this PR until firebase_core changes are stable. |
Not ditched, shifted to early next year, as mentioned on the Roadmap we're looping back to polish off the web implementation on all the plugins we reworked for native, so Web is definitely still getting attention. |
Ok what are the next steps after importing dependencies ? How do we use this in dart file ? I've tried importing like this
Update After these my app runs on web and I got assertion failure same as @byrek3d @awazgyawali |
I'm also getting some exception can you tell me what's wrong |
|
Can this PR get some love again now that firebase_core is stable? |
|
I would love to have some official update on this, or at least some kind of mention of it on the roadmap. The way it is right now, is quite hard to have any ideia of the status of this. |
|
Hey all, I created and merged #5887 a few days ago which moves This PR itself is so far out of date (not the authors fault) that I don't think we can move forward with this one, there's been significant restructures, CI changes and updates happening across the repository. That said I don't think we should just discard the work that's happened here. If contributors are willing I'd like to propose the following;
Whilst If you're picking up any of the points above, please reply below so others are aware. If you need assistance with contributing or have any queries on implementation detail then please reach out to me also. |
This comment has been minimized.
This comment has been minimized.
| return completer.future; | ||
| platform.TransactionResultPlatform transactionResult = | ||
| await _delegate.runTransaction( | ||
| (platformTransaction) async => platformTransaction, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here transactionHandler from the function is not passed So the transaction is not working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm working on another PR #6668
|
|
||
| /// `Event` encapsulates a DataSnapshot and possibly also the key of its | ||
| /// previous sibling, which can be used to order the snapshots. | ||
| class EventPlatform { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really need to create separate model classes for Platform. We can move the Event class for e.g, to the platform_interface (of course with the public constructor) and then we can export this class to use it in the firebase_database for e.g.
|
Thanks for the contribution @awazgyawali but we're closing this PR in favour of: #6952 |

Description
This PR will add support to realtime database for Web
Related Issues
flutter/flutter#48542
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?