Skip to content

[cloud_firestore] Firestore.instance.runTransaction(...) returns... a Map? #1642

Closed
@cielo

Description

@cielo

Is your feature request related to a problem? Please describe.
In javascript SDK, runTransaction method returns a promise containing value that was returned within runTransaction function. However, flutter firestore's runTransaction returns an arbitrary map.

https://github.com/FirebaseExtended/flutterfire/blob/master/packages/cloud_firestore/cloud_firestore/lib/src/firestore.dart#L135

Describe the solution you'd like
It is difficult for developers to understand how they can utilize the result of runTransaction. It will be helpful if a doc can be updated to reflect how callers can handle value returned from runTransaction. e.g. If value cannot be utilized, then shouldn't runTransaction return void?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions