Flutter & Firebase App Tutorial #24 - User Data Model

preview_player
Показать описание
Hey gang, in this Flutter tutorial we'll set up a stream to listen to our Firebase/Firestore user data & create a UserData model to reflect any data we get back.
----------------------------------------

🐱‍💻 🐱‍💻 Course Links:

🐱‍💻 🐱‍💻 Other Related Courses:

Рекомендации по теме
Комментарии
Автор

name: snapshot['name'],
sugars: snapshot['sugars'],
strength: snapshot['strength']

working in june 2021

mujeebrahman
Автор

If you are watching this after 24/09/2020. Try ...data()['stuff'] instead of data['stuff'].

fabiorodrigo
Автор

Watching tutorials since 15 years and love many of them but you sir are an extraordinary good teacher ... also love the structuring of your project.. thanks, keep going and greetings from swiss, Alex

alexandergeuze
Автор

6:20 "You should get quite used to this"
yea... i don't really understand 🤣 but i just follow along

StarBattle
Автор

Your videos got me started in creating apps, thank you so much! I'm now in my second year studying software engineering to get a university certificate

cookiigames
Автор

Well done breaking down every bit of code.

TechFriendly
Автор

@The Net Ninja - you have no idea how useful this video was for me. Thanks A BUNCH!!!

HezOmanjo
Автор

Please create some practical use case using provider package... I like your teaching style very much..

anirudhachakrabarty
Автор

Updated syntax:

UserData snapshot) {
return UserData(uid: uid, name: snapshot.get('name'), sugars: snapshot.get('sugars'), strength: snapshot.get('strength'));
}

got no errors.

andythedishwasher
Автор

Hi shaun! I love your tutorials! I have question... can't we just inherit the uid property from User model to Brew data model rather than creating new a data model? Is that possible? Thanks!

chasingbugs
Автор

First of all, your tutorials awesome, but I don't understand why are you not fusing the UserData model into the User model, is it a convention/preferred way of doing or is it for simplicity sake? Can you please explain, thanks in advance

ItsMe-rcnd
Автор

it's so hard to understand the streaming parts.

woonmar
Автор

I have an error: the argument type User Data function cannot be assigned to parameter... Anyone knows whats wrong?

CheerApp
Автор

Hello Shaun, your tutorials are all awesome! Would you be interested in making one for Nativescript?

amjad-se
Автор

For the UserData class, I removed the 2nd, 3rd and 4th property, and just replaced it with a property "brew" of type Brew. However in database.dart, for the _userDataFromSnapshot() method, I get an error for setting the brew property as "new Brew(snapshot.data['name'], snapshot.data['sugars'], snapshot.data['strength'])". Console says that it expects 0 positional arguments, but the Brew constructor takes in 3 arguments. Can anyone help me with this?

csmortal
Автор

FOR NEWER V OF VSCODE USE
UserData snapshot) {
return UserData(
uid: uid,
name: snapshot.data["name"].toString(),
sugars: snapshot.data["sugars"].toString(),
);
}

nathanhanif
Автор

I'd appreciate any help with the error: "The operator '[]' isn't defined for the type 'Map<String, dynamic> Function()' (database.dart Lines 36, 37, and 38). - Thanks -

panchopacheco
Автор

Sir, your tutorials are great amd may be the best one can find on internet.
But sir, I am having trouble intregating firebase with flutter. I am trying to so hard to figure it out for around 2 weeks, but no luck. But still I watch the tutorials, because it's to hard to miss such a great content.

sleepingsaintz
Автор

Hello Shaun, I want to create an app where i want to load products, feature products, some category wise list etc, so should i use stream for each list or some thing else, is my app will be slow or any drawback in term of performance etc.

wasiullahqureshi
Автор

Hi,
Let's say I have a textformfield which is used to Add 'Category' data into the Cloud Firestore from Flutter.
I am successfully able to add 'category' into the firestore database, but in the textformfield, i need a validation that says "This Category Already Exists, Please try another" by checking the data in the firestore databse. And if the user types some other category, then only the Form can be submitted.
Means that there are no two documents with the same name in the collection.,
As i am a beginner, i would request you to make a video on that particular topic.

If i am unable to make you understand what exactly I'm talking about,
please let me know.
Your help would be Appreciated wholeheartedly.
Thank You in Advance!! :)

dhruvpatel