Skip to content

[firebase_database] transaction do nothing #22

Closed

Description

@ektelat

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

Activity

  1. changed the title [-]database transaction do nothing[/-] [+][firebase_database] transaction do nothing[/+] on Aug 25, 2019
  2. Ehesp commented on Apr 22, 2020

    @Ehesp
    Member

    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.

  3. locked and limited conversation to collaborators on Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions