The Firebase Realtime Database and Flutter - Firecasts

  Рет қаралды 82,601

Firebase

Firebase

Күн бұрын

Let's add the Firebase Realtime Database to your Flutter app! This tutorial will cover basics like installing the library, writing and updating data, and reading your data in realtime, and then it will cover other important topics like using the Realtime Database with StreamBuilders, FutureBuilders, Providers, using the emulator suite, security rules, and much more!
Chapters:
0:00 - Introduction and our new format
0:53 - What database should I use?
3:47 - The Realtime Database data model
7:35 - Installing the library
10:23 - Writing to the database
14:19 - set() vs update()
17:22 - Appending nodes
20:22 - Reading in data
24:34 - Adding in null-safety
25:03 - Fetching larger records
27:44 - One-time fetching
30:24 - StreamBuilders and FutureBuilders
37:20 - Separating data and display logic
40:10 - Using a Provider
47:06 - Thinking about your data
49:09 - Security rules
51:57 - Using the emulator
55:36 - The FirebaseAnimatedList widget
58:31 - Conclusion
Resources:
Documentation → goo.gle/3ziSc1x
The Database Decider page → goo.gle/37t4eJ9
The Realtime Database for SQL developers video series → goo.gle/36NaY4U
Getting started with Firebase on Flutter →goo.gle/3zbjF52
Best Practices: Arrays in Firebase → goo.gle/3rkQTvY
Firebase security rules video → goo.gle/32exFee
Getting started with the CLI → goo.gle/3ilEILs
Watch more Firecasts for Firebase Developers → goo.gle/Firecasts
Subscribe to Firebase → goo.gle/Firebase
#Firecasts #Firebase #Flutter
product: Firebase - Realtime Database; fullname: Todd Kerpelman; re_ty: Publish;

Пікірлер: 146
@AmericanBoy1776
@AmericanBoy1776 2 жыл бұрын
Life-changing tutorial. The presentation is clear and simple. I like that it’s only one hour-perfect amount of time to explain this type of topic.
@Firebase
@Firebase 2 жыл бұрын
Glad you enjoyed it!
@anastariq357
@anastariq357 Жыл бұрын
Great work ! I rarely enjoy watching tutorial videos, but this one was 100% enjoyable.Especially the sound when you change screens :D .
@DarkChasmGamers
@DarkChasmGamers 2 жыл бұрын
TODD I'VE MISSED YOU😭😭😭
@BrianTX541
@BrianTX541 2 жыл бұрын
Great video. I love how you include relevant use cases for your examples.
@UsamaKarim
@UsamaKarim 2 жыл бұрын
Yes, Please! Keep it lengthy & comprehensive. We want to get all the knowledge in one place.
@mohammadnazari5180
@mohammadnazari5180 Жыл бұрын
This tutorial below my mind! Awesome work, Todd!!
@viacheslavromanov3098
@viacheslavromanov3098 2 жыл бұрын
Awesome and comprehensive explanation with the nice examples!💪🏻That's what we developers really love ❤️Appreciate the effort, Todd 🙏🏻
@Firebase
@Firebase 2 жыл бұрын
Glad you enjoyed it!
@1daneet
@1daneet 2 жыл бұрын
Had issues using Firebase Realtime Database until this video. I enjoyed watching it and have been able to get proper understanding of its usage which I'll proceed further by reading the documentation. I also think making a longer in depth video like this one is much better than shorter videos.
@RogiervanApeldoorn
@RogiervanApeldoorn 2 жыл бұрын
I really like this kind of videos. Very good explanation! Keep up the good work!
@Zizo1st
@Zizo1st 2 жыл бұрын
Perfect tutorial! That's really a very informative one, I thought I am good with RTDB, but after watching this, I've realized that I've missed lots of good stuff! Thanks Todd
@Firebase
@Firebase 2 жыл бұрын
Great to hear!
@prelude0133
@prelude0133 2 жыл бұрын
I like this new presentation format and nicely explained. Thank you.
@Firebase
@Firebase 2 жыл бұрын
Glad you liked it!
@Chop5chop
@Chop5chop 2 жыл бұрын
This is great, love the long format
@lasaint589
@lasaint589 2 жыл бұрын
Finished the video woooo. It's 2328hrs on a school night ,but well worth it; the video answered a tonne of questions.
@justvikas
@justvikas 2 жыл бұрын
I really like this, basic but covered many important things.
@maxmaeffert20
@maxmaeffert20 2 жыл бұрын
this might be the best guide I've ever seen
@estranhokonsta
@estranhokonsta 2 жыл бұрын
Nice. Many basic but certainly good things in this video. The addition of the optional pattern designs was cool too. One problem of this longer videos is that there is a greater probability of them being too (dated) specific to the software versions used in it, but i still think that it brings great value to the channel. Why worry for something that hasn't come yet? Nobody would do anything that way. The ideal would be to keep the two formats (short and long videos). And use them according to the occasion.
@sandwichtube
@sandwichtube 2 жыл бұрын
Thanks for taking the time to make this video.
@Firebase
@Firebase 2 жыл бұрын
Glad it was helpful!
@maxeem3596
@maxeem3596 2 жыл бұрын
Thank you, Todd! Great tutorial! Great job!
@Firebase
@Firebase 2 жыл бұрын
Glad it was helpful!
@komellar97
@komellar97 2 жыл бұрын
Finally some good realtime database tutorial ✊
@darokadx
@darokadx 2 жыл бұрын
Very good video, it even answers one of my question on StackOverFlow about how to convert DataSnapshot to a Data model object ! Format is really nice, and explanations really clear, i was simply hoping you would cover the RTDB scaling / Sharding data but i guess this will be for another video 👌🏻
@trainofthought5733
@trainofthought5733 2 жыл бұрын
YEP make LONGER btw love your explanations ❤❤❤❤❤❤
@-_AK_-
@-_AK_- Жыл бұрын
Your Video is very helpful and very easy to understand thank you so much for this great video and explanation ❤❤
@engbesher7479
@engbesher7479 Жыл бұрын
amazing tutorial
@yulianislamprayoga
@yulianislamprayoga Жыл бұрын
Thank you for the explanation sir
@uditmishra5583
@uditmishra5583 2 жыл бұрын
Best explanation on the Internet!!!
@UsmanTahir6
@UsmanTahir6 2 жыл бұрын
Excellent Tutorial!
@Firebase
@Firebase 2 жыл бұрын
Glad you liked it!
@pinkasey
@pinkasey 2 жыл бұрын
You make great videos. They are really fun to watch, while being very educational. The problem I have with Firestore is the limited querying capabilities. Compared to SQL - it's like a toy, not suitable for "real application". Some examples: 1. No way to count records, without fetching them 2. Cant query by comparing two fields of the same doc 3. Cant query for doc which lack a field (which would be useful for maintaining a denormalized data-model) 4. No uniq costraints And so on
@HammadKhanYT
@HammadKhanYT Жыл бұрын
Is firebase database suitable for searching data and presenting that to users? I want to store my customer data in it.
@CodeNight-dm2hv
@CodeNight-dm2hv 2 жыл бұрын
I learned so much here. Thank you
@Firebase
@Firebase 2 жыл бұрын
Glad it was helpful!
@raziel6193
@raziel6193 Жыл бұрын
This videa is amazing. Thank you
@ame5r
@ame5r 2 жыл бұрын
make it longer, and cover more stuff. please!
@Tyrowo
@Tyrowo 9 ай бұрын
love this video thank you
@Studi0usKidd0
@Studi0usKidd0 2 жыл бұрын
This was a fantastic video!
@Firebase
@Firebase 2 жыл бұрын
Thank you!
@turtle-rabbitpark8715
@turtle-rabbitpark8715 2 жыл бұрын
This is awesome!!!!!
@JeffreyLiu8
@JeffreyLiu8 2 жыл бұрын
Good job!
@fishheadbreakroom
@fishheadbreakroom 2 жыл бұрын
Great video
@learningwithafen1346
@learningwithafen1346 2 жыл бұрын
Very nice. Thank you :)
@Firebase
@Firebase 2 жыл бұрын
Welcome!
@nat101yt
@nat101yt 2 жыл бұрын
To me one-hour is the sweet spot.
@jmathew2011
@jmathew2011 2 жыл бұрын
Ok now this video but for Firestore please! Adding a section for best practices, really complex queries, best practices for common data structures (user-profiles, chats, foreign-key referencing, mapping/location, JSON maptype, timestamps, etc, etc)
@xmanreturn
@xmanreturn 2 жыл бұрын
longer videos are needed!
@mohammadkashif5441
@mohammadkashif5441 2 жыл бұрын
very helpful video ❤
@Firebase
@Firebase 2 жыл бұрын
Glad you think so!
@rvb6516
@rvb6516 2 жыл бұрын
Love it ✨👍
@Firebase
@Firebase 2 жыл бұрын
Thank you! 😊
@zoozolplexOne
@zoozolplexOne 2 жыл бұрын
cool !!!
@Liosnaprod
@Liosnaprod 2 жыл бұрын
thank you !
@codebuddies9238
@codebuddies9238 2 жыл бұрын
Love it
@anggoran7398
@anggoran7398 2 жыл бұрын
thanks a lott!!
@2009worstyearever
@2009worstyearever 2 жыл бұрын
yes, make them longer and cover more stuff. with respect to your docs, this just seems better
@drantunes
@drantunes 2 жыл бұрын
Is any solution for write limit per second on Firestore (use Pub/Sub?)...The transaction 'batch' count 1 write on commit or N writes if the transaction contain N write operations? Thanks for the video!!
@jimcomccabe3
@jimcomccabe3 2 жыл бұрын
23:00 . it does not happen immediately. it takes 1 sec to replace the original text" results go here" with the downloaded string from realtime database. is there a way to show directly the downloaded string?
@mohammadshamimhossain538
@mohammadshamimhossain538 2 жыл бұрын
Good to see this lesson
@Firebase
@Firebase 2 жыл бұрын
Thanks for watching
@maxzaki5621
@maxzaki5621 2 жыл бұрын
Thank u. I have one Question. When using push().set(), if I want to get added document key, what should I do?
@marlhex6280
@marlhex6280 2 жыл бұрын
Short and to the point thanks. 1 to 3 min max.
@RaadYacu
@RaadYacu 2 жыл бұрын
more the better
@congtoannguyen1940
@congtoannguyen1940 2 жыл бұрын
So which kind of way should I use to read the real time database, the Stream builder or the Provider way
@zanovis
@zanovis Жыл бұрын
Amazing overview. Maybe give a warning about set() since it can wipe your entire DB if you don't know the difference between set() and update() yet :P
@vaughnnarvacan3338
@vaughnnarvacan3338 2 жыл бұрын
The getter 'snapshot' isn't defined for the type 'Event'. I keep getting this error with StreamBuilder
@ahmadammar8866
@ahmadammar8866 2 жыл бұрын
have you solve it?
@isiakamfugale3621
@isiakamfugale3621 2 жыл бұрын
Sir u told us one option of using futureBuilder. Does it allow realte update on ui??
@vijaykumar-wq9pg
@vijaykumar-wq9pg Жыл бұрын
I am struggling to retrieve the data from FB realtime database, always stuckup at Unhandled Exception: type 'List' is not a subtype of type 'Map'...kindly help
@KImtOs
@KImtOs 2 жыл бұрын
what about how to integrate App check with flutter ?
@CurryMan12345
@CurryMan12345 2 жыл бұрын
What is the VSCode theme you are using?
@agilmmmdov5110
@agilmmmdov5110 2 жыл бұрын
Hi I need help . When I wrote one sentence for example name 1. Value ." I like football" I can see only one word "I" in my application how can I fix please
@lovefrommemee5710
@lovefrommemee5710 2 жыл бұрын
Finally...
@carlevans60
@carlevans60 2 жыл бұрын
Longer, more in depth videos!
@ainaraziq3599
@ainaraziq3599 Жыл бұрын
type 'Null' is not a subtype of type 'String' The relevant error-causing widget was StreamBuilder I get this error in stream buidler
@adityavns1
@adityavns1 2 жыл бұрын
When is flutter web support coming for real-time database?
@lkeysoft
@lkeysoft 2 жыл бұрын
Much needed!!
@maxmaeffert20
@maxmaeffert20 2 жыл бұрын
Isn't it by now?
@Topbrains
@Topbrains 2 жыл бұрын
Is there a way to get a copy of the code?
@yiisuseusse
@yiisuseusse 2 жыл бұрын
Min 25:50 I can't do that... it still gives me an error The argument type 'Object?' can't be assigned to the parameter type 'Map'.
@TheAhmed710
@TheAhmed710 2 жыл бұрын
Instead of: Map.from(snapshot.value); Use this: Map.from(snapshot.value as Map); This will cast the Object into a Map
@diptanshumahishcovers9096
@diptanshumahishcovers9096 Жыл бұрын
@@TheAhmed710 dayyyumn ,life saving!!!!
@oneplusgeek7510
@oneplusgeek7510 Жыл бұрын
​@@TheAhmed710 thanks! but when real time db is empty i got an error : type 'Null' is not a subtype of type 'Map' in type cast.
@adttwo
@adttwo Жыл бұрын
Great video, but I think there should be a link in the comments to the completed code project. Having to pause the video every few seconds to compare my code to yours is frustrating and frequently leads to long trips down the rabbit hole while I try to figure out what you've done that's just off the top or bottom of the video screen.
@ingamgavu7025
@ingamgavu7025 2 жыл бұрын
Unhandled Exception: missingPluginException error on firebase_database please need help its been a week having this problem
@tjakemelvin
@tjakemelvin 2 жыл бұрын
In 26:13 I have an error when typing "final data = new Map.from(event.snapshot.value);" saying that The argument type 'Object?' can't be assigned to the parameter type 'Map How can I solve it please?
@JoJo-yu7hh
@JoJo-yu7hh 2 жыл бұрын
Me the same, do you already have a solution?
@utkusarican5520
@utkusarican5520 2 жыл бұрын
8:28 When you back these version, you can use it. I was using last version and get same error. I couldn't fix it so I change the version of firebase_core and firebase_database
@tanikagulati307
@tanikagulati307 2 жыл бұрын
Just use this final data = Map.from(event.snapshot.value as Map);
@BeatFreakDJs
@BeatFreakDJs 2 жыл бұрын
Thank you, Tanika..you saved me a lot of time!
@chadlyalan
@chadlyalan 2 жыл бұрын
@@tanikagulati307 When I try to access data like shown above I get this error: Expected a value of type 'String', but got one of type 'Null' I can print data and I see the giant JSON object that I'm querying but I can't access any fields from my json object..
@tezelyusuf
@tezelyusuf 2 жыл бұрын
Exception is thrown anyway -> The argument type 'Object?' can't be assigned to the parameter type 'Map at line 25
@adelnehikhare4071
@adelnehikhare4071 2 жыл бұрын
Same problem I'm having
@mobiledev5295
@mobiledev5295 2 жыл бұрын
@@adelnehikhare4071 its outdate... flutter 2.5 came in spt
@mhwadah
@mhwadah Ай бұрын
Can I use flutter with firebase sql instead of firebase NoSQL?
@PedroFonseca5
@PedroFonseca5 2 жыл бұрын
Is it just me that gets a lot of errors when trying to implement the exact same code in my apps ... ? The videos are great, no doubt, but sometimes it just doesn't let me compile
@sultanabbas9411
@sultanabbas9411 2 жыл бұрын
when I access orders/abc/price , does it load the other children of "abc" as well? or only orders the "price" child of "abc" ?
@Frank_van_Puffelen
@Frank_van_Puffelen 2 жыл бұрын
The Realtime Database loads the path you read from and the data under it, but not the data above it. So in your scenario it'll only load the price and not any other properties of `abc`.
@indulgewithal7526
@indulgewithal7526 2 жыл бұрын
I have built a few streambuilders using this tutorial for guidance, but when the user hasn't yet entered the data that the stream takes, it returns the error type 'Null' is not a subtype of type 'Map', how to I get around this? All methods I have tried fail to stop this error.
@indulgewithal7526
@indulgewithal7526 2 жыл бұрын
@@chicagoworkscom I ended up using shared preferences to store a local int that tracked how many times data was stored (or removed) by the user, anything above zero and it would run the stream builder, other wise a placeholder image. The problem with your solutions is it comes back with a snapshot with some data, somehow. I would of imagined they would have a better solution to this and documentation to go with it. Was also frustrating how his example should of shown this problem when the database doesn't yet have data. Appreciate you looking into it! I have had so many issues with real time data base and how it works. getting there tho!
@jimmyicoffee
@jimmyicoffee 2 жыл бұрын
Why can't I choose another region for realtime db? region Australia is needed!
@ajinkyakhobragade8557
@ajinkyakhobragade8557 2 жыл бұрын
Is there a git repository for the project?
@Eslam-Sameh
@Eslam-Sameh 2 жыл бұрын
When will be the flutter windows and linux support?
@kingstation5992
@kingstation5992 2 жыл бұрын
make it longer. please!
@lasaint589
@lasaint589 2 жыл бұрын
Flutter is only at its dawn imagine it in 3 years. Program a Space Rover
@tintin537
@tintin537 2 жыл бұрын
Make it longer and cover more, the more the merrier
@adammurday17
@adammurday17 Жыл бұрын
At 8 minutes in you reference another video "go watch that video now", but its not clear what video is being referenced?
@blessingmguni6705
@blessingmguni6705 2 жыл бұрын
code for main dart is not clear
@mars3142
@mars3142 2 жыл бұрын
I would like more in-depth videos, but it should be a series of videos. I don‘t like to open one video to see within the description the covered topics/areas. The video title should show the topics.
@zeldax5961
@zeldax5961 2 жыл бұрын
Hey! How to get the auto generated Unique-ID?
@Firebase
@Firebase 2 жыл бұрын
Hi! You can find information about how unique identifiers work through our Firebase blog here: firebase.blog/posts/2015/02/the-2120-ways-to-ensure-unique_68
@ThePoignancy
@ThePoignancy 2 жыл бұрын
the DataSnapshot object is severely underspecced, missing many methods in the official SDK like child(), hasChildren(), forEach()
@maronilabuni5935
@maronilabuni5935 2 жыл бұрын
how to get the source code
@volkankarakus8013
@volkankarakus8013 2 жыл бұрын
why cant we use reference() now??
@samorket8091
@samorket8091 2 жыл бұрын
use .ref()
@volkankarakus8013
@volkankarakus8013 2 жыл бұрын
@@samorket8091 thx :)
@devstuff2576
@devstuff2576 2 жыл бұрын
THOSE SHORT VIDZ ARE FOR TIK TOKERS ...We are programmers.
@jimcomccabe3
@jimcomccabe3 9 ай бұрын
get for ios returns all nodes , not the one that you are interested in. this is a bug .
@lkeysoft
@lkeysoft 2 жыл бұрын
I thought Realtime was about to be discontinued in favor of Firestore?
@fluttec
@fluttec 2 жыл бұрын
Longer, more in depth videos
@jimcomccabe3
@jimcomccabe3 2 жыл бұрын
40:00
@MacMaurof6
@MacMaurof6 2 жыл бұрын
outdated
@ezenaguemmanuel3163
@ezenaguemmanuel3163 2 жыл бұрын
Please make the videos short
@thomasmabika7291
@thomasmabika7291 2 жыл бұрын
3 hours should be the standard video duration.
@olamilekanadeleke6806
@olamilekanadeleke6806 2 жыл бұрын
// make long and detailed Videos If(Video.long){ Video.better(); Video.wellDetailed(); }
@TalYaron
@TalYaron 2 жыл бұрын
TMI - I just needed to learn how to use firebase and flutter. Being experienced in firebase, I wasn't needing the intro.
@CodeNight-dm2hv
@CodeNight-dm2hv 2 жыл бұрын
In the stream publisher don't forget to create an empty list and check is the snapshot exists so it will not crash when there's no items in the database. Example: Map ordersMap = {}; if (event.snapshot.exists){ ordersMap = Map.from(event.snapshot.value); }
@jiratpattaragultawee6560
@jiratpattaragultawee6560 2 жыл бұрын
final data = new Map.from(event.snapshot.value); return error The argument type 'Object?' can't be assigned to the parameter type 'Map, anyone know why?
@ingeniorGames
@ingeniorGames 2 жыл бұрын
I get the same error
@ingeniorGames
@ingeniorGames 2 жыл бұрын
[UPDATE] I fixed the problem in this way: (event.snapshot.value) as Map
@peterbparker6968
@peterbparker6968 2 жыл бұрын
final data=Map.from(event.snapshot.value); doesn’t work for me . It shows error: The argument type Object? can’t be assigned to the parameter type Map…. Any solutions?
@chuckh9857
@chuckh9857 2 жыл бұрын
Me too.
@chuckh9857
@chuckh9857 2 жыл бұрын
I tried this: final data = event.snapshot.value as Map; The compile error went away but it cashed with this: Unhandled Exception: type '_InternalLinkedHashMap' is not a subtype of type 'Map' in type cast.
@chuckh9857
@chuckh9857 2 жыл бұрын
Here you go. Change the firebase_database dependency from #^9.0.2 to 7.0.0.
@chuckh9857
@chuckh9857 2 жыл бұрын
firebase_database 8.2.0 works (released 8 days ago) 9.0.0 and higher does not (released 2 days ago, and 17 hours ago)
@peterbparker6968
@peterbparker6968 2 жыл бұрын
@@chuckh9857 i tried making it 7.0.0 and it ended up giving me errors ill try this thanks alot friend
Getting started with Firebase on Flutter - Firecasts
19:28
Firebase
Рет қаралды 174 М.
Cloud Firestore Data Modeling (Google I/O'19)
40:37
Firebase
Рет қаралды 171 М.
Жайдарман | Туған күн 2024 | Алматы
2:22:55
Jaidarman OFFICIAL / JCI
Рет қаралды 1,5 МЛН
ИРИНА КАЙРАТОВНА - АЙДАХАР (БЕКА) [MV]
02:51
ГОСТ ENTERTAINMENT
Рет қаралды 8 МЛН
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 7 МЛН
Best 30 Flutter Widgets, Packages & Tips
5:11
Flutter Mapp
Рет қаралды 118 М.
Firestore Security Rules - How to Hack a Firebase App
10:05
Fireship
Рет қаралды 129 М.
Getting started with the Firebase Realtime Database on the web
10:18
Using Firestore as a backend to your Flutter app
11:42
Google for Developers
Рет қаралды 522 М.
What is Firebase and how to use it
41:01
Firebase
Рет қаралды 290 М.
How to show live Firebase data in your Flutterflow app
27:20
FlutterFlow
Рет қаралды 103 М.
Database Sharding and Partitioning
23:53
Arpit Bhayani
Рет қаралды 67 М.
Pragmatic State Management in Flutter (Google I/O'19)
33:25
Flutter
Рет қаралды 447 М.
ПОКУПКА ТЕЛЕФОНА С АВИТО?🤭
1:00
Корнеич
Рет қаралды 3,4 МЛН
Lid hologram 3d
0:32
LEDG
Рет қаралды 10 МЛН
Что не так с яблоком Apple? #apple #macbook
0:38
Не шарю!
Рет қаралды 241 М.