Skip to content
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] transaction do nothing #22

Closed
ektelat opened this issue Aug 24, 2019 · 1 comment
Closed

[firebase_database] transaction do nothing #22

ektelat opened this issue Aug 24, 2019 · 1 comment
Labels
plugin: database type: bug Something isn't working

Comments

@ektelat
Copy link

ektelat commented Aug 24, 2019

i run transaction to add 1 to the last value, put it return the last value
this my code:
Future saveNewMission(Message message) async {
TransactionResult res = await _firebase
.reference()
.child('offices')
.child(this.officeKey)
.child('counters/missions')
.runTransaction((count) async {
count.value = (count.value ?? 0) + 1;
return count;
});

this.count = res.dataSnapshot.value;

always i get la last value that saved on the database

@collinjackson collinjackson changed the title database transaction do nothing [firebase_database] transaction do nothing Aug 25, 2019
@BondarenkoStas BondarenkoStas added the type: bug Something isn't working label Sep 23, 2019
@Ehesp
Copy link
Member

Ehesp commented Apr 22, 2020

Hi @ektelat due to the age and inactivity of this issue I'm going to close it. Please try upgrading versions of Flutter & the plugin as there has been many changes since this issue was created.

If it continues to be a problem after upgrading, please create a new issue following the issue template.

@Ehesp Ehesp closed this as completed Apr 22, 2020
@firebase firebase locked and limited conversation to collaborators Aug 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
plugin: database type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants