I just wanna say I am very thankful that I saw your channel. Out of all the channels I am subscribed, you are one of the top 5 if not the best channel teaching flutter! In my opinion, lots of the technique you have used (mostly on advance tuts) can be considered production grade and some just need some few tweaks and they are ready to go! Just so you know, I subscribes to many channels teaching flutter just to keep updated about it. But, for some reasons, I never really delve into it. Your teachings are one of the reason I will be studying flutter now. I look forward for more of your videos . Thanks Andrea! :)
@andreykotkovets68685 жыл бұрын
Great, Andrea. I see the light at the end of ProviderUnderstanding tunnel ;)
@sk8sbest4 жыл бұрын
great comment
@goddardpk3 жыл бұрын
Andrea, thanks for concise and informative examples! This 14 minute segment is priceless!
@techyeunoia94144 жыл бұрын
just starting out with flutter and I'm already thankful you exist and make these tutorials
@dl888894 жыл бұрын
I just signed up for your REST API course on your website. Can't wait to get started. Thank you for putting up all these great resources!
@isurujn3 жыл бұрын
I appreciate the effort you put into your tutorials. As someone who learns by visualising, your charts/graphs of the overall system really helps. Thank you 🙏🏼
@findsarfaraz4 жыл бұрын
Great... tutorial... . you people make internet a better place
@AndreClements2 жыл бұрын
wow, it's architecture is so elegant :-)
@curiousnrd5 жыл бұрын
This is fantastic! Thank you for the hard work. I look forward to the rest of the series!
@infinitezymalny4 жыл бұрын
look out which version of provider u use, according to documentation in v4.x.x: The parameters builder and initialBuilder of providers are removed. initialBuilder should be replaced by create. builder of "proxy" providers should be replaced by update builder of classical providers should be replaced by create
@graphiclife54165 жыл бұрын
Great! Finally one propper tutorial with the Provider and Firestore. It would be nice if you also create a users collection for user details like most apps do. And please show us how to create a stream without streambuilder in custom class with ChangeNotifier and how to dispose stream. I'm super excited for your future tutorials! Thank you!
@CodeWithAndrea5 жыл бұрын
Thanks. There's nothing wrong with streams per-se. If you use a 3rd party API that gives you streams (e.g. Firebase auth, Firestore), then StreamBuilder/StreamProvider is the way to go. I normally only use ChangeNotifier/ChangeNotifierProvider for local application state. But yes, a lot of this is a good topic for future tutorials.
@graphiclife54165 жыл бұрын
@@CodeWithAndrea What if you need data from the Firestore on multiple screens but you don't need to display them, do you still use StreamBuilder? I also bought your Flutter course on Udemy I found yesterday. I hope your course is different because all the courses I found are showing how to create StreamBuilder and display data right away. I need one tutorial for initiating the stream > manipulating stream data > making data globally available across the app. Or even better: initiating 2 streams > combing and manipulating stream data > and making data globally available.
@CodeWithAndrea5 жыл бұрын
Graphiclife you can manipulate stream data inside a Bloc if you want. My course shows how to work with stream subscriptions, create and manage streams in Blocs, and combine multiple streams with RxDart.
@kirill45315 жыл бұрын
That's what I was waiting for! Great. Subscribed and turned notifications ON! I'm excited because of the announced future optimization of the architecture and the proper approach which you will show us at the end of this series. !!! Also please don't forget to show how to handle gracefuly errors which may arise in services (auth/user/data/etc.) and how to consume them in the UI (a snackbar or a dialog)
@CodeWithAndrea5 жыл бұрын
Sure, next video is coming next week. Re. handling errors - the videos already show try/catch blocks where appropriate. The simplest thing is to show a dialog inside the catch (this is easy to do, also covered in detail in my paid course).
@kirill45315 жыл бұрын
@@CodeWithAndrea Andrea Bizzotto try/catch handling is for services and ViewModel layer, whereas in the UI you want to show corresponding dialogs to the user. And the question is how do you do that. What I do: is I have a Stream in my ViewModel and in the UI I listen to that stream and show snackbars or dialogs on each portion of data
@rasmustchristensen5 жыл бұрын
Perfect once again. I already have provider and Firebase Auth in the app I'm building, but learned a few tips I'll refactor to improve!
@yassinyoussoufali63245 жыл бұрын
You really explain things well. Can't wait for the next episodes :)
@moses9955 жыл бұрын
You're amazing at what you do
@JimmyCheng5 жыл бұрын
great work man, you are wonderful!
@DrSndan5 жыл бұрын
Thank you for this wonderful tutorial
@icalculi4 жыл бұрын
regarding signout, @12:50 should i make the provider to listen false?
@Linxy5 жыл бұрын
Thanks, absolutely fantastic, the best!! You are 1000000000x better than fireship
@CodeWithAndrea5 жыл бұрын
Linxy Thank you. I get a lot of inspiration from Fireship. Glad my videos are useful
@themindstorm99474 жыл бұрын
For managing authState, why do you use a streamBuilder? Is not not suitable to use a Consumer()? Other than that, I understood everything, great tutorial!
@CodeWithAndrea4 жыл бұрын
You need something that can consume a Stream. So either a StreamBuilder or a StreamProvider.
@MasatoNakada15 жыл бұрын
Thanks Andrea for an awesome video! Quick question. Why did you use stream to track authentication and not changeNotifyProvider?
@CodeWithAndrea5 жыл бұрын
ChangeNotifierProvider works with objects that implement ChangeNotifier. Streams don't. So it's easier to just use a StreamBuilder in this case.
@MasatoNakada15 жыл бұрын
Andrea Bizzotto thx for the response and my bad! My question should be, why did you use stream instead of changeNotifier? I recall that you refactored to changeNotifier on your Udemy course..
@themindstorm99474 жыл бұрын
@@MasatoNakada1 even I was confused as to why a streamBuilder had to be used. I thought that by referencing something from the service, the widget would automatically rebuild itself on a change. Did you find the answer?
@MasatoNakada14 жыл бұрын
TheMindstorm from what I understand today, since Firebase_auth only gives you the Stream of FirebaseUser, you have to first use that to get the User class. Once you do that, you can add that value to a Privider and expose that to the widget tree under it. Well I maybe completely wrong though 🤫
@seanthomas93985 жыл бұрын
Thanks for this video! In the AuthWidget, does "listing: false" do anything? It looks like the FirebaseAuthService isn't a ChangeNotifier, and that the only way we can get updates is via the StreamBuilder.
@CodeWithAndrea5 жыл бұрын
In theory, I agree with you. In practice, I have observed an issue where unwanted widget rebuilds were taking place when pushing routes IF the AuthWidget is a descendant of MaterialApp. This should not be a problem if you use the code from Advanced Provider Tutorial 3.
@mual775 жыл бұрын
WOW!! Thanks a lot.
@サイコロ-q3u4 жыл бұрын
magnificent!!!
@faisalahmed19815 жыл бұрын
good one
@fumesmaispasque5 жыл бұрын
Thanks you, which "indent extension" do you use please ? and can you list all yours VsCode extensions
@CodeWithAndrea5 жыл бұрын
I listed all my extensions here: kzbin.info/www/bejne/q3eYo4NoiriDbaM
@adammusaali49065 жыл бұрын
Thank's so much for this tutorial,that god help you
@Bathusaix5 жыл бұрын
Hi Andrea .. I love your tutorials .. A query here in this project there is no user creation? that is to say the method of firebas e to create users? in the atuh services I don't see that method
@CodeWithAndrea5 жыл бұрын
Nestor Marquez when you sign in anonymously, Firebase creates a new user.
@Bathusaix5 жыл бұрын
@@CodeWithAndrea I mean the method createUserWithEmailAndPassword is not in this project right?
@strikeoffate3 жыл бұрын
will the whole thing be updated to null safety? In Avatar Reference i get error, that it can't return Null
@puspanjalimohapatra75604 жыл бұрын
Hii, my homepage is extended to statefullwidget , everytime if i pressed button or using Textformfield to input text ,streambuilder is building the homepage again .pls give me a solution
@BrianAkaBear5 жыл бұрын
How do you correct error: flutter Exception has occurred. FormatException (FormatException: Unexpected character (at character 1) ^ ) when parsing json?
@CodeWithAndrea5 жыл бұрын
Looks like you're trying to parse HTML as JSON. That won't work. Would be best to fix your backend API and ensure it always returns JSON.
@dhruvkelawala9605 жыл бұрын
Can you share the desktop wallpaper?
@macdon23515 жыл бұрын
Thank you
@rizi6194 жыл бұрын
what kind of changes do we need if we want to this with REST api, rather than firebase
@NatoBoram4 жыл бұрын
You need an existing back-end. Then, using the same services, just send a HTTP Post request to said back-end and return its value in a Future.
@garethbeall36745 жыл бұрын
Is there a Provider version of StreamBuilder?
@CodeWithAndrea5 жыл бұрын
Gareth Beall yes, it’s called StreamProvider. I’ll cover it in future videos, but you can look up the documentation for now.
@rikyriky9665 жыл бұрын
A great video again, as always. Do you know how to access a provider of an instance of widget class from the next route? For example, I have a provider class named “PostPVD” which I use as the state controller of a presentation widget class named “PostScreen”. PostPVD is used in every instance of the PostScreen as a controller by using a variable “postPVD”. There is another presentation widget class named “PostEditScreen”. Users can navigate to PostEditScreen from PostScreen back and forth. I want to have an access to that “postPVD” inside of PostEditScreen and make two routes share the exact same instance of postPVD. I actually find a way and will edit this comment as soon as I get my hands on my laptop. I pass the postPVD as a parameter to the PostEditScreen and consume it. So they share the same provider instance. In other words they share the same controller.
@CodeWithAndrea5 жыл бұрын
Provider can work with multiple routes, as long as your providers are ancestors of the MaterialApp. I'll cover this in detail in upcoming videos. But for now you can check the finished source code: github.com/bizz84/firebase_user_avatar_flutter/tree/optimized-implementation
@rikyriky9665 жыл бұрын
Andrea Bizzotto Huge thanks for sharing the complete repo Andrea. I think it may not work if I declare the providers by wrapping the root of my app. Because they are now available fir the rest of the widget tree. So every other widget use the same provider as the state controller. Btw, AuthProvider, StyleProvider, LocalizationProvider, BasketProvider etc. are the ones that all the widget tree must have an access. So I declare them inside a MultiProvider by wrapping the root of my app widget, as you suggest. However, I really needed individual providers that are solely available for each new instance of a widget or route. Separately and independently from each other. In order to make these type of state controlling, I instead declare them inside the corresponding widget so only that instance of the widget has access to that particular provider. If I want to make that provider to the next route, I pass the “provider” and the “context” to the next routes as constructor parameters. So the declared provider can be consumed by the Consumer widget in the next route. There is no need for you to reply and it’s totally OK. It’s just me wanted to write a few of my opinions :)
@CodeWithAndrea5 жыл бұрын
@@rikyriky966 Yes, if you need individual providers, then they don't go at the root of the widget tree. In this scenario, I normally inject the dependencies that I need to the constructor of the widgets presented inside routes. This way I don't have to hold on to other widgets' contexts.
@AnvildevilGq004 жыл бұрын
a lot of code from netninja
@johndavedecano24384 жыл бұрын
why people always assume that were always be using firebase?
@techcsnerd13283 жыл бұрын
yess.. There should be more tutorials on Flutter plus NodeJs/PHP
@theascendunt99603 жыл бұрын
@@techcsnerd1328 That's not the point of this tutorial. The exact tech stack you use in the backend shouldn't matter to learn Provider. If you learn to do it with Firebase, you should be able to learn how to do it with other tech stacks on your own. Stop relying on spoonfeeding.
@phamquang92172 жыл бұрын
FirebaseUser changed to User AuthResult changed to UserCredential GoogleAuthProvider.getCredential() changed to GoogleAuthProvider.credential()