Using Firestore as a backend to your Flutter app

Поделиться
HTML-код
  • Опубликовано: 26 дек 2024

Комментарии • 245

  • @jungeunwoo6905
    @jungeunwoo6905 6 лет назад +42

    Compact with exactly useful information. The most professional flutter tutorial video I've seen so far. Thank you.

  • @LadislavSzolik
    @LadislavSzolik 4 года назад +6

    Thanks Andrew! That it very useful! I need to say, you got a natural and friendly voice to explain!

  • @d4rthvad3y
    @d4rthvad3y Год назад

    This was really cool! The like button lights up when he gets to the part where he talks about the db updating in response to UI events!

  • @gvcallen
    @gvcallen 4 года назад +15

    Honestly a really amazing video. Very thorough, informative and somehow condensed into a 12 minute video. Thanks a lot

  • @vedmodikauratg1865
    @vedmodikauratg1865 2 года назад +1

    this covers all I need to know in less than 12 minutes. what a video.

  • @qasimbaig2466
    @qasimbaig2466 3 года назад +2

    At [8:26] snapshot.data.documents.length not working in 2021.. any help

    • @arunss8091
      @arunss8091 2 года назад

      I also have the same issue....., If you resolved it please share me

    • @1pailo
      @1pailo 2 года назад +1

      Do the following:
      body: StreamBuilder(
      stream: FirebaseFirestore.instance.collection('YOUR_COLLECTION').snapshots(),
      builder: (
      context,
      AsyncSnapshot snapshot) {
      if (!snapshot.hasData) return const Text('Loading..');
      final data = snapshot.requireData;
      return ListView.builder(
      itemExtent: 80.0,
      itemCount: data.size,
      itemBuilder: (context, index) =>
      _buildListItem(context, data.docs[index]),
      );
      },
      ),

  • @faheemahmad3957
    @faheemahmad3957 Год назад

    this was awesome!! please make more like these and go indepth

  • @JoshuaRoy
    @JoshuaRoy 6 лет назад +63

    They put the iOS screenshot on the pixel...

  • @davidweiss5249
    @davidweiss5249 6 лет назад +2

    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;"

  • @강준우-w2x
    @강준우-w2x Год назад

    Thank you so so much It's so clear that can understand how connect to database and write data just following. Thank you for serving this amazing dart language and flutter developers.

  • @lordeloalvaro
    @lordeloalvaro 6 лет назад +6

    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

    • @lordeloalvaro
      @lordeloalvaro 6 лет назад +2

      I've some few questions about flutter like MVC pattern, an authentication default process(that's common on other frameworks), localization default pattern...flutter has a great variability of widgets, though to turn itself in a complete solution it needs a little more effort, it's on the right path.
      Thanks for your reply, & have a nice life.

  • @Mohammadoudat
    @Mohammadoudat 3 года назад +8

    Thank you for your infromative tutorial. However, we are in 2021 and too much updates applied on Flutter and Dart. Therefore, we need a 2021 videos. Appretiate the help.

  • @ameen_was_here4958
    @ameen_was_here4958 6 лет назад +35

    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

    • @redbrogdon
      @redbrogdon 6 лет назад +16

      I'm not on the Firebase team (so I can't speak for them), but I'd be *extremely* surprised if that weren't the case. You can always try posting on their discussion forum just to be sure, though: groups.google.com/forum/#!forum/firebase-talk

    • @forestlaw89
      @forestlaw89 6 лет назад +3

      They have been warning people about the changes in Firestore. For example, the change of dates to Timestamps

  • @BenHayat
    @BenHayat 6 лет назад +3

    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" ?

  • @MichaelDuarte
    @MichaelDuarte 5 лет назад +7

    Its amazing how simple this was to implement.

  • @mtoheed1085
    @mtoheed1085 3 года назад +1

    Hi Sundar Pichai !!
    Are you listening?
    Codelab link not working. Please update it.

  • @kimanoir1136
    @kimanoir1136 3 года назад

    THIS MAN KNOWS WHAT HE'S DOING

  • @michaelessiet5172
    @michaelessiet5172 3 года назад

    This looks surprisingly easy

  • @jasonsebring3983
    @jasonsebring3983 5 лет назад +2

    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.

  • @tanmayfuse1747
    @tanmayfuse1747 6 лет назад +8

    Can u able to fetch document files containing images and text from Firestore and display in flutter app?

    • @marlonsubuyu2012
      @marlonsubuyu2012 3 года назад +1

      You have to upload the images to Firebase Storage, then you paste the Storage reference of each file in Cloud Firestore

    • @RazaviImran
      @RazaviImran 3 года назад

      Same question i have

  • @myname5667
    @myname5667 4 года назад +2

    If transactions are made to prevent race conditions, why can't you use them when you are offline / what do you do when two clients edit the same field of one document and you want to merge the changes (i.e. if the field is a list)

  • @chstr0ng
    @chstr0ng 4 года назад +2

    Could we get some content on how to unit test and mock firestore? It's really hard to unit test streams and no information anywhere.

  • @kamranyusifov95
    @kamranyusifov95 4 года назад +3

    This is good. But please update the codelab to the recent changes, like the firebase core requirement.

  • @EmreYavuzalp
    @EmreYavuzalp 4 года назад +3

    I wish you showed us the whole code, it doesn't work. And it gives a load of errors.

  • @GideonvanderMerwe
    @GideonvanderMerwe 4 года назад +2

    Hey Andrew, thanks for the awesome video. I have a question. Let's say you log in with firebase and pull some data down e.g. your latest band votes/results. Now lets say you close the app completely, even from the background. Then you open it again with no internet. Will it still use the last data pulled from firestore, or will it use the default values that you demonstrated? Thanks

  • @kirill4531
    @kirill4531 6 лет назад +5

    what's the difference between Firebase Real-time Database and Firebase Firestore?

    • @redbrogdon
      @redbrogdon 6 лет назад +4

      The Firebase team has an article that can explain it way better than me. :) firebase.google.com/docs/database/rtdb-vs-firestore

    • @kirill4531
      @kirill4531 6 лет назад +2

      Andrew Brogdon, that's what I like in Google - they foresee all my questions :)
      Thanks Andrew!

  • @Trancecend
    @Trancecend 5 лет назад +2

    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.

  • @srinivasaraov4569
    @srinivasaraov4569 3 года назад

    app channels spinning some time when using google firebase database and flutter application. how to download or backup firebase database . is there any automatic backups

  • @niteeshmahato1596
    @niteeshmahato1596 4 года назад

    when a new document is added, snapshot fetches all the documents including the new one or only the newly added one ?

  • @kukuhdrawable6449
    @kukuhdrawable6449 5 лет назад +2

    Hi i had error with gradle task assembledebug failed with exit code 1
    Can you help me

  • @MisterDibitybopty
    @MisterDibitybopty 3 года назад

    Every time the list gets updated, is that a read from the database from each item? So 10 items would be 10 reads? Seems far too costly to use firestore database if that's the case.

  • @nicorobin7666
    @nicorobin7666 5 лет назад +1

    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

    • @ThomasLock
      @ThomasLock 5 лет назад +1

      You wouldn't want to directly connect over MySQL. You need to create a REST API to do this.

  • @superstark8543
    @superstark8543 4 года назад

    If I was in a band, I have would have not thought this much at first place. And if I tried to think that much, I would have smashed my guitar out of frustration.

  • @TouhidSunny
    @TouhidSunny 4 года назад

    why there is no doc support for flutter in firebase portal ???

  • @SureshKumarMajhi
    @SureshKumarMajhi 6 лет назад

    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 - pub.dartlang.org/packages/cloud_firestore#-example-tab- . Is it really require to mention this setting thing or not? I'm bit confused about this.

  • @letslearncomputerprogramming
    @letslearncomputerprogramming 5 лет назад

    What is best for android or flutter in future?

  • @WayT0Aesthetic
    @WayT0Aesthetic 5 лет назад +2

    Gradle problem when i try to use firebase.. fix this

  • @anthonygabriana3943
    @anthonygabriana3943 5 лет назад

    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.

  • @fmnaq
    @fmnaq 6 лет назад +6

    please is there a GitHub repository to this tutorial?

    • @brian-beeler
      @brian-beeler 5 лет назад

      github.com/beelerb/flutter_firestore_example
      It's just the code the video starts and ends with but better than nothing and it works. Note the part about the pubspec.yaml file.

  • @alandigital360
    @alandigital360 5 лет назад +6

    Does not work on Android with cloud_firestore:, I need to add the version cloud_firestore: ^0.7.4 :(

  • @miladfattahi9852
    @miladfattahi9852 5 лет назад +2

    Is possible to use Firebase for ios backend?

  • @harjitsingh7308
    @harjitsingh7308 6 лет назад

    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?

  • @DDOCTORGaming
    @DDOCTORGaming 2 года назад

    Hi, by any chance do you have a video which you can link me to, that tackles the function of reading out-loud data fetched from Firestore as audio to user? Thanks

  • @mohamedaly9096
    @mohamedaly9096 6 лет назад +1

    is there a way to store values locally using flutter and a local database like SQL?

    • @andrewbrogdon558
      @andrewbrogdon558 6 лет назад +3

      In this video, I'm using the snapshot to build widgets and update the UI, but you can (in theory) do whatever you want with it. For example, you could listen to the stream with a function that stored the data in SQLite, local files, or something similar.

    • @mohamedaly9096
      @mohamedaly9096 6 лет назад +1

      thanks a lot Andrew

  • @d-apps2699
    @d-apps2699 5 лет назад +3

    I loved this guide, please more tutorials about flutter + firebase o/

  • @AvinashSingh-nq5ud
    @AvinashSingh-nq5ud 6 лет назад

    Thanks, Andrew sir, Please keep coming with more videos

  • @JohnShaft-w8l
    @JohnShaft-w8l 6 месяцев назад

    I am getting error from iOS xcode build - module “cloud_firestore” not found…. How can I fix the error

  • @vinceramces
    @vinceramces 6 лет назад +5

    What about AngularDart/dart2js? Is the flutter team different from angulardart team?

  • @neilbhutada9666
    @neilbhutada9666 4 года назад

    I didn't understand the point you mentioned at the end regarding the use of transactions instead of using the rudimentary updateData function. Could someone please explain this to me in simple words?

    • @andrewbrogdon558
      @andrewbrogdon558 4 года назад

      To increment the number of votes, the app needs to do three things:
      1) Read the number of current votes from Firebase.
      2) Add one to that value.
      3) Store the new value in Firebase.
      If you only have one user, this works great. What if you have two users, though, who try to increment at the exact same time? They would both read the current value at the same time, add one to the same value, and then store it. Instead of getting n+2, you'd get n+1.
      Transactions can fix that. They make it so one client will execute all three steps at once, while the other sits and waits for their turn. When the first client is done, the next one can have a go with their three steps.

  • @AndresElToday
    @AndresElToday 5 лет назад +1

    I'm not being able to connect the Flutter app to Firebase for iOS. I followed exactly all the steps but I couldn't get the data from the database. Also, I couldn't verify the installation because it never finished. I waited some time there, but got no results. I have looked all over the internet to find a solution but none have been of use. I tried deleting pod files, I checked AppDelegate.swift, pubspec dependencies. All. Please, I really need help here.

    • @andrewbrogdon558
      @andrewbrogdon558 5 лет назад

      Hopefully you've already found a solution to the issue, but if not, try posting on the FlutterDev Google group. You can include code, config files, and so on. The folks there are helpful and typically very experience with Flutter: groups.google.com/forum/#!forum/flutter-dev

  • @wdavis6254
    @wdavis6254 5 лет назад

    Yes sometimes i come down here to see how many developers are using flatter

  • @TheBooban
    @TheBooban 6 лет назад +1

    Do you have to choose between Firestore and the Realtime Database or can you have both?

    • @redbrogdon
      @redbrogdon 6 лет назад +1

      You can indeed use both in the same app: firebase.google.com/docs/firestore/firestore-for-rtdb

  • @spidey5324
    @spidey5324 4 года назад

    I can use flutter and firebase in my androids and ios while on web I use React and firebase? Thanks.

  • @nazmulhayat9842
    @nazmulhayat9842 4 года назад +1

    why isn't document['name'] not working?
    it shows this error: The operator '[]' isn't defined for the type 'DocumentSnapshot'

    • @matteorango1076
      @matteorango1076 4 года назад

      While using latest version (^0.14) callling document['name' ] is deprecated... the right way is document.data()['name']

  • @mouttafiqimane7346
    @mouttafiqimane7346 5 лет назад +2

    thank u for this tuto i want to ask you how can i get a stream from a specific user

  • @nep_coder
    @nep_coder 6 лет назад

    Is there any free web development course offering by google.

  • @theethicalh3707
    @theethicalh3707 4 года назад +1

    Oooooooooooooooooooh my good that's exactly what i was searching for thaaank you so much google i looooooove you man

  • @chasingdownchano
    @chasingdownchano 5 лет назад

    Is there a place I could find the code used in this video? A github link or something?

  • @mdazharuddin4684
    @mdazharuddin4684 5 лет назад

    How can we check if a transaction fails?

  • @chordfunc3072
    @chordfunc3072 5 лет назад

    I love firebase, but lately using firebase on the ios side has been a pain in the ass. The latest project I started on takes 8 minutes to build when adding the auth and cloud_firestore plugins, and If I try to add the google_sign_in plugin the project simply won't compile. It works fine on Android but on iOS its a very different story. Could you please fix the plugin or update the docs to reflect any changes you have to make to your iOS project to get it to play nicely with firebase and google_sign_in

  • @utkarshmehta4430
    @utkarshmehta4430 4 года назад

    Is it possible to stream mp4 or mkv video from url? In flutter

  • @aDifferentJT
    @aDifferentJT 6 лет назад

    So your atomic operation can be async?

  • @aeggeska1
    @aeggeska1 4 года назад

    How do you do this for Firebase Web?

  • @RaitonGG
    @RaitonGG 5 лет назад

    what about youtuber api? any vídeo on it?

  • @redsool1
    @redsool1 6 лет назад

    Is there a convinient way to transfer firebase project from one google acc to another?

  • @gersonricardotoribioossio9720
    @gersonricardotoribioossio9720 5 лет назад +2

    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.

    • @dionplant9197
      @dionplant9197 5 лет назад +1

      try this
      in -> gradle.properties
      add:
      android.useAndroidX=true
      android.enableJetifier
      in -> app/build.gradle
      change:
      minSdkVersion from 16 to 21
      add:
      dependancies
      implementation 'androidx.multidex:multidex:2.0.0'

  • @Rafiq07
    @Rafiq07 4 года назад

    What about Google Cloud Datastore? Are there any examples of using that as a backend for Flutter projects?

  • @gokulakrishnan1977
    @gokulakrishnan1977 5 лет назад +3

    Andrew Brogdon: 10:04
    Me: Yeah I Know... I Know...

  • @arunkumar_v
    @arunkumar_v 4 года назад

    Is there a code repository for this source?

  • @toobarahat4456
    @toobarahat4456 4 года назад

    Can I use flutter to make a order delivery + customer loyalty app?

  • @creative-commons-videos
    @creative-commons-videos 5 лет назад

    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 ???

  • @rezamohebbi2692
    @rezamohebbi2692 4 года назад

    hi guys . is there a tutorial out there about how to set custom claims / role based auth / rolebased access contorll in flutter using firebase?

  • @ammardorea1835
    @ammardorea1835 5 лет назад

    Hey,
    Thank you very helpful video, I have question is this was an UI kit mobile app?

  • @laamssinc2185
    @laamssinc2185 5 лет назад

    Can I use golang as my server side language with flutter?

  • @louismarieatolukoayariga6052
    @louismarieatolukoayariga6052 3 года назад

    The codelab link is not working. Please update it

  • @florianrohrauer8471
    @florianrohrauer8471 5 лет назад

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

  • @raghav4296
    @raghav4296 5 лет назад

    #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 😊

  • @ismaelramos4518
    @ismaelramos4518 4 года назад

    how can i add data to a sub-collection with flutter?

  • @metallitech
    @metallitech 6 лет назад +2

    Can I use Firestore as a backend to my Wibblewobble app, with Zigizigah as the front end?

    • @blipblap614
      @blipblap614 6 лет назад +4

      Only if you really really really wanna.

  • @shaikhsaiofali8432
    @shaikhsaiofali8432 5 лет назад +1

    How can we paginate in stream builder?

    • @shaikhsaiofali8432
      @shaikhsaiofali8432 5 лет назад

      @@emilyfortuna2262 thanks for yours response...actually i am getting data by fetching n items at once.And the problem arises when i fetch next batch of items,i am unable to put the next batch into stream.

  • @warcraft3reforgedisannounc428
    @warcraft3reforgedisannounc428 5 лет назад +1

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

  • @noormohammedshikalgar
    @noormohammedshikalgar 6 лет назад

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

  • @s_ap
    @s_ap 4 года назад

    How will I add to Web app as well ?

  • @WholeNewLevel2018
    @WholeNewLevel2018 6 лет назад +1

    I like illustrative video, awesome explanation great job,

  • @zafana1
    @zafana1 4 года назад

    I've set this up but it wasn't so straightforward and took a lot of time... different versions of the plugins were incompatible and project settings needed to be modified for both Android and iOS.

  • @storylineteam
    @storylineteam 4 года назад

    Great video, but what about the e2ee... using this approach the users data is visible to the firebase console manager, that is against the EU GDPR law...

    • @redbrogdon
      @redbrogdon 4 года назад

      This video is mostly scoped to using Firebase collections with Flutter widgets. If you're interested in Firebase's security and privacy support, I highly recommend this doc: firebase.google.com/support/privacy

  • @mind5367
    @mind5367 4 года назад

    How about user Registration and authentication? please help

  • @william_chidube
    @william_chidube 3 года назад

    snapshot.data.length? The getter 'length' isn't defined for the type 'Object'. Anybody?

  • @IbanVan
    @IbanVan 4 года назад

    Hi, Someone knows how to do a join in firebase and flutter ?

  • @muhammadmujtabaappiah9787
    @muhammadmujtabaappiah9787 4 года назад

    Hello, please i added the cloud firestore and now the app doesn't run on a device with api 19... please help

  • @nuwanmalintha
    @nuwanmalintha 5 лет назад

    i got this error when run on iphone simulator.
    /Users/nuwan/Downloads/fluttertest/ios/Pods/FirebaseDatabase/Firebase/Database/third_party/Wrap-leveldb/APLevelDB.mm:54:9: fatal error: 'leveldb/db.h' file not found
    #import "leveldb/db.h"

  • @SisirKumarPathy
    @SisirKumarPathy 4 года назад +1

    Possible issues in integrating to Firestore and solutions [2020]:
    1. No Firebase App '[DEFAULT]' has been created - stackoverflow.com/questions/63492211/no-firebase-app-default-has-been-created-call-firebase-initializeapp-in
    2. D8: Cannot fit requested classes in a single dex file - stackoverflow.com/questions/55591958/flutter-firestore-causing-d8-cannot-fit-requested-classes-in-a-single-dex-file
    3. Plugin with id 'com.google.gms.google-services' not found - stackoverflow.com/questions/39892622/plugin-with-id-com-google-gms-google-services-not-found
    4. firestore: PERMISSION_DENIED: Missing or insufficient permissions - stackoverflow.com/questions/46590155/firestore-permission-denied-missing-or-insufficient-permissions
    5. Dart/Flutter : Converting timestamp - stackoverflow.com/questions/50632217/dart-flutter-converting-timestamp
    6. How to print Firestore timestamp as formatted date and time - stackoverflow.com/questions/56627888/how-to-print-firestore-timestamp-as-formatted-date-and-time
    7. FLUTTER | How to add data to an existing document in firestore - stackoverflow.com/questions/50559148/flutter-how-to-add-data-to-an-existing-document-in-firestore

  • @TheRubiosMusic
    @TheRubiosMusic 2 года назад

    Hi there! Awesome content!
    I have been looking all over the internet and firebase website a tutorial of how to populate a list (by hand) like you did in minute 3:20. Specifically how to upload media files and assigning them a link to reference them in a collection or document. I am looking for a solution that can be done only using the console. I don't want to "code" my library into my project.
    So far I only find examples of how to develop apps that interact with the collections and documents. I am trying to develop an app where the users only read from the library I will be populating. They create playlists from the existing collections and their "child" users can play their specific playlists.
    Can someone please point me the right direction. A document or video tutorial works for me. I am really not being lucky finding the right document or video tutorial.
    Super thank ful in advance!

  • @urvashisharma7415
    @urvashisharma7415 4 года назад

    i didnt really follow why we changed the onTap function from a plain update to something else...could someone help me out on this please?

  • @itkamsan349
    @itkamsan349 5 лет назад

    Could you make a video how to join collections?

  • @anoop4real115
    @anoop4real115 4 года назад

    I am getting error.....Firebase: Could not find the Android Application module.

  • @baimamboukar4492
    @baimamboukar4492 4 года назад

    coool! Can we have a tutorial talking about AndroidX Migration? I have serious troubleshooting

  • @codingworkout3637
    @codingworkout3637 4 года назад

    my app stops whenever i run it. 'Unfortunatelly app has stopped'. Ididnt write any code, i just added the firestore.

  • @tuphuongdanh4569
    @tuphuongdanh4569 6 лет назад

    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,

    • @andrewbrogdon558
      @andrewbrogdon558 6 лет назад +1

      I'm not showing it in this episode, but the Firestore plugin contains a Query class that can help you with this: github.com/flutter/plugins/blob/master/packages/cloud_firestore/lib/src/query.dart

  • @aladdinaouimeur2649
    @aladdinaouimeur2649 5 лет назад

    *GREAT JOB YOU GUYS ARE THE BEST*