Flutter State Management - Routes and Provider

Поділитися
Вставка
  • Опубліковано 15 жов 2024
  • 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 ...

КОМЕНТАРІ • 22

  • @7259-y5i
    @7259-y5i 4 місяці тому

    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.

  • @sasha2209
    @sasha2209 2 роки тому

    Thank you so much!!!!! i was struggling so much for learning provider. but with your videos i have better understanding of provider! thanks!

  • @JS19190
    @JS19190 2 роки тому +3

    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! 🙂

  • @abhishekverma614
    @abhishekverma614 3 роки тому +5

    Awesome, one of the best resource available on youTube regarding providers in flutter, thanks!!!

  • @usmanmsd1034
    @usmanmsd1034 3 роки тому +5

    I really love the way you organize a tutorial and its metadata. love the way you teach.

  • @DiyaLalDileepLal
    @DiyaLalDileepLal Рік тому

    I can't thank you enough to make me understand the concepts of routes and providers. Can you make a video on Supabase with flutter?

  • @zahrayousefi9400
    @zahrayousefi9400 2 роки тому

    I feel so lucky that I found you. thanks so much
    You helped me a lot

  • @xpwahab1
    @xpwahab1 3 роки тому +2

    Clear explanations as always 🙌

  • @ertantokerconsulting3905
    @ertantokerconsulting3905 3 роки тому +2

    Really good explanation. Thank you!

  • @fvagvTV
    @fvagvTV 3 роки тому +1

    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?

    • @JohanJurrius
      @JohanJurrius  3 роки тому +2

      I would place it above the main MaterialApp that contains your Routes.

  • @distributedchaos5129
    @distributedchaos5129 2 роки тому

    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.

    • @distributedchaos5129
      @distributedchaos5129 2 роки тому

      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.

  • @usmanmsd1034
    @usmanmsd1034 3 роки тому +1

    Well i Have not watched the next video but I want to ask one question about the appBarColor of Settings. I want it to change all appbar colors.

    • @JohanJurrius
      @JohanJurrius  3 роки тому

      You can then just wrap all appBars in Selector or Consumer to listen for the same value.

  • @usmanmsd1034
    @usmanmsd1034 3 роки тому

    You were saying that you would make tutorials on keys. I am still waiting for the keys topic.

    • @JohanJurrius
      @JohanJurrius  3 роки тому +1

      I am looking at MBAAS right now. Will definitely update the course and add keys in the future.

    • @usmanmsd1034
      @usmanmsd1034 3 роки тому

      @@JohanJurrius okay.

  • @usmanmsd1034
    @usmanmsd1034 3 роки тому

    I have tried to change it from the ThemeData()..... but thats building the setting again....

  • @jimaustin3608
    @jimaustin3608 3 роки тому

    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?

    • @JohanJurrius
      @JohanJurrius  3 роки тому +1

      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.

    • @jimaustin3608
      @jimaustin3608 3 роки тому

      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. 🙄