Using Firestore as a backend to your Flutter app
Articles Blog

Using Firestore as a backend to your Flutter app

100 thoughts on “Using Firestore as a backend to your Flutter app

  1. I am aware that firestore is in beta. But if i were to use it in production in one of my apps, Will firebase team notify devs about breaking changes before they were made
    Please reply

  2. Could we start getting more advanced articles/videos about performance, scaling or about some unknown/unused features ?

  3. It's very interesting, but iOS Swift with Cloud Firestore don't work. I checked it several times. And not only me. iOS with Objective-C and Android (Java and Kotlin) work correctly.

  4. hi, im getting this two errors in my debug console (core_booster, getBoosterConfig = false) and (Could not reach Firestore backend.) In my firestore data i ve got a Collection "Recipes" and then in de documents i ve got each recipe with its own attribute.
    Here i leave you a sneek peek of the code:
    new StreamBuilder(

    stream: Firestore.instance.collection('Recipes').snapshots(),

    builder: (context, snapshot) {

    if (!snapshot.hasData)

    return const Center(child: CircularProgressIndicator());

    return ListView.builder(


    itemBuilder: (context, index) =>




    Then in my _buildListRecipe I'm accessing each in value of each recipe.



    width: double.infinity,

    height: 150.0,

    fit: BoxFit.cover,


  5. This is brilliant… But it breaks my iOS side.

    The use of Swift 3 @objc inference in Swift 4 mode is deprecated. Please address deprecated @objc inference warnings, test your code with “Use of deprecated Swift 3 @objc inference” logging enabled, and then disable inference by changing the "Swift 3 @objc Inference" build setting to "Default" for the "Runner" target.
    diff: /Podfile.lock: No such file or directory
    diff: /Manifest.lock: No such file or directory
    error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

    I believe this is a framework bug, but any clues as to a work around?

  6. Hey Andrew i was searching how to make a custom listview layout widget can you suggest where to search for that??

  7. Ive started to use firestore but lets say for some reason i have to switch to somethinf different in the future. Will this process be easy?

  8. Hi,
    I am using Firestore plugin to communicate with my data. My question is how to get data with a condition with Firestore? Or how to Find a user by email address?
    I think this question will be asked from many programmers.
    Thank you,

  9. Are there any tutorials that show how to use cloud_firestore with firestore rules? As best as I can determine in flutter example code, request.auth.uid is not sent to the server.

  10. runTransaction() produces error when you hit the list item many times on the same device. There is still a bug in this method and hopefully you guys fix it asap.

  11. How does StreamBuilder of Flutter affect the Firebase pricing in general? It's cool to have dynamic data, at the same time I have to worry about the cost.

  12. Hi, in your code at the time of configure firestore you didn't use any kind of "firestore.settings()" the way it has been mentioned it here – . Is it really require to mention this setting thing or not? I'm bit confused about this.

  13. I've start using flutter, though it's very hard to find a good example of how to,
    There're lot of videos I'd like to have just a doc that explains every widget.
    Thanks for the video tutorial and great job

  14. Note that you should use the console to edit the Database.Rules to avoid a PERMISSION error on the android app; change "allow read, write: if false;" to "allow read, write: if true;"

  15. At 2:07 in the video, to register the flutter app in Firebase where Do I go to my Flutter solution to get that Android App name?
    The instructions I get from that help, I can't find the name.
    Where di you get "com.flutter.firebase.example.flutterfirebase" ?

  16. #askflutter
    Hi Andrew, a noob question –
    With respect to Firebase client SDKs, we have android and iOS but not specifically for Flutter and I assume we need to download both for working with Flutter? In terms of the whole array of features that Firebase and suite of integration it offers, is it safe to assume that all firebase features available if we were to write only android/iOS using their respective client SDKs be available in Flutter as well (or) are there any constraints that we need to be aware of?
    Thank you 😊

  17. hey i am facing this issue
    Launching libmain.dart on J7 Pro in debug mode…

    Initializing gradle…

    Resolving dependencies…

    Running 'gradlew null'…

    The Gradle project does not define a task suitable for the requested build.

    Review the android/app/build.gradle file and ensure it defines a debug build type.

    registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

    registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

    registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

    registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

    registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

    FAILURE: Build failed with an exception.

    * What went wrong:

    Task 'null' not found in root project 'android'.

    * Try:

    Run gradlew tasks to get a list of available tasks. Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output. Run with –scan to get full insights.

    * Get more help at

    BUILD FAILED in 2s


    WARNING: This version of cloud_firestore will break your Android build if it or its dependencies aren't compatible with AndroidX.

    See for more information on the problem and how to fix it.

    This warning prints for all Android build failures. The real root cause of the error may be unrelated.


    Finished with error: Gradle build failed: 1

  18. Good tutorial. I would have mentioned, however, that the iOS step for adding the Pod dependency SHOULD be skipped, instead of not mentioning it at all. But still good, I got started pretty quickly.

  19. There really is a ton of work being done for you here. I normally would have to setup a socket server and a way to sync things together upon fresh load etc etc. I wonder about buffering when say there are 10000 things going on at once meaning say you were showing popular posts in a feed that were showing meta items like votes and chat counts etc.

  20. how can i use firestore in custom package ? if i want to create a flutter package that uses firebase.. where to put json file, package android directory, or user app android directory ???

  21. PLZ PLZ PLZ, I want to Learn hot configuration firebase Auth PHON with flutter to android and IOS and Silent APNs notifications PLZ PLZ PLZ

  22. Hi all please tell me which package contains tomap() and frommap() methods if possible give me link thanks.

  23. What if I don't have the final name for my project, yet? Can I change it later?

  24. But isn´t that solution of updating the data with a Transaction muchh slower than just changing the value as the first solution?

  25. i got this error when run on iphone simulator.

    /Users/nuwan/Downloads/fluttertest/ios/Pods/FirebaseDatabase/Firebase/Database/third_party/Wrap-leveldb/ fatal error: 'leveldb/db.h' file not found
    #import "leveldb/db.h"

  26. After this video, you gotta see this:
    and then This:
    they would be helpful after you start implementing Firestore in your product

  27. Guys can someone help me. i try to follow this guide but it doesnt work. my problem is when i try to add the iOS app, it tells me the projectname isnt allowed to have a "_" in it. but androidstudio is forcing me to have this "_" in the package name and i did not have any success changing it later. thx in advance

  28. Very useful, I'm evaluation to move my iOS app using Firestore to Flutter so I don't need to build a native Android app.

  29. When I tried implementing it won't update the vote unless I refresh the page by going to the previous page then back.
    the difference is that I'm passing the "DocumentSnapshot document " to another page using a MaterialPageRoute so my code looks like this :

    icon: Icon(Icons.thumb_up),

    iconSize: 30.0,


    *onPressed: () {

    Firestore.instance.runTransaction((transaction) async {

    DocumentSnapshot freshSnap =

    await transaction.get(value.reference);

    await transaction.update(freshSnap.reference, {

    'downVote': freshSnap['downVote'] + 1,




    where "value = DocumentSnapshot document" passed from the previous page.

    note: when I click on it I see the real-time change in the database but on the app itself it won't change unless I refresh.

  30. error: Missing concrete implementation of StatefulWidget.createState. (non_abstract_class_inherits_abstract_member_one at [flutter_app] libmain.dart:24)
    can you explaine me what is wrong
    i coppied all strings correctly

  31. I searched the whole internet but could not find a single lesson on how to connect flutter and dart to mysql on phpmyadmin (not local host, its hosted on a server) or how to implement CRUD operations, please do some lessons for us, thank you so much

  32. Amazing and a really good explanation. It works to me. I think the documentation in firebase is not up to date because I couldn't be able to run firebase in my flutter app, a lot of problem in gradle file.

  33. I tried to run step by step as explained on
    but i stuck on step 11
    some how
    Firestore.instance.runTransaction((transaction) async
    won't work 🙁 and i don't know what to do.

  34. When you install the google-services.plst for ios make sure to install it by opening the project in xcode and right clicking on the Runner Folder and using add file to add the google services file. Otherwise if you drag and drop it in your editor like intellij for some reason it makes the app freakout and create a bunch of errors. Took me 7 hours of trouble shooting to figure out that this was all I needed to do.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top