In this video we look at how to use the provider package with routes in our app. Watch the whole playlist for my Flutter course here: • Flutter Course . You can find my Dart playlist here: • Dart Basics and a bit ...
I was struggling with using Provider in combination with Router, but thanks to your video I was able to solve my problems. Thank you very much for this video, your effort has been greatly appreciated! 🙂
Good evening, I followed with great interest your playlist on flutter which I find very instructive for someone who wants to excel on mobile application development with flutter. This while, if your time allows, can you make videos on the BLoC package and also flutter firebase. Thanks again for everything.
Regarding Error in the import ' ' statements after copying "lib" folder: It seems if the import statement are written in "relative format" using "./" or "../" helps in maintaining the relationships between the files even if it's parent folder name is changed. For example: import '../routes/routes.dart'; rather than import 'package:routes_and_provider_video/routes/routes.dart'; Thanks Sir for the best tutorials on Dart and Flutter.
Also, if you need to add latest dependencies to the project, in the terminal inside the app's folder, running 'flutter pub add provider, http, google_fonts' automatically fetches and adds latest libraries in the .yaml file.
Your videos are very helpful! I have a simple question - is it a good practice to put your provider in the main page wrapper when you need the state in two different routes?
Stackoverflow: Flutter ChangeNotifierProvider builder is deprecated “Since provider version 3.2.0 "builder" is marked as deprecated in favor of ‘create’.” (17:40) I assume it’s the same for MultiProvider … what am I missing here?
Hi Jim. I am using the newest version of Provider, currently 6.0.1, and I don't get any deprecated warnings. 3.2.0 was released back in Nov 2019. Maybe it was added again in newer versions. I have no problems, also none with MultiProvider. Currently it seems you must have both create and builder OR create and child.
Johan, Interesting … from the Provider Changelog: - 3.2.0 says ‘Deprecated "builder" of providers in favor to "create"’ - 4.1.0 says “Added builder on the different providers.” … and shows the syntax you do. Guess these guys ‘put their pants on one leg at a time’ just like us. 🙄