starter_architecture_flutter_firebase
starter_architecture_flutter_firebase copied to clipboard
Using advanced Firestore features (e.g. transactions, batched writes, etc.)
TL;DR
what about Firestore transactions, batched writes, field value operations (e.g. FieldValue.arrayUnion
)?
Long version
First off, thank for this repo! I have been developing apps in Flutter and it is refreshing to see a different take on app architecture. I have learnt a lot from your work.
I am considering the abstraction you use for working with Firestore db. The approach of viewing it as a CRUD db makes testing easier and also probably migrating to a different db possible.
This abstraction, however, comes at the cost of not having access to the Firestore's advanced features such as transactions, batched writes, field operations such as FieldValue.arrayUnion()
, FieldValue.increment()
, etc.
I'm interested to know how would you approach exposing these features while still aiming for testability and portability.
@bizz84 I would love to hear your opinion on this topic!