Flutter State Management - Routes and Provider

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 มิ.ย. 2021
  • 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

  • @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 2 ปีที่แล้ว +5

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

  • @usmanmsd1034
    @usmanmsd1034 2 ปีที่แล้ว +5

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

  • @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!

  • @7259-y5i
    @7259-y5i 2 หลายเดือนก่อน

    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.

  • @ertantokerconsulting3905
    @ertantokerconsulting3905 3 ปีที่แล้ว +2

    Really good explanation. Thank you!

  • @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 🙌

  • @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?

  • @fvagvTV
    @fvagvTV 2 ปีที่แล้ว +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  2 ปีที่แล้ว +2

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

  • @usmanmsd1034
    @usmanmsd1034 2 ปีที่แล้ว +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  2 ปีที่แล้ว

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

  • @usmanmsd1034
    @usmanmsd1034 2 ปีที่แล้ว

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

  • @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.

  • @jimaustin3608
    @jimaustin3608 2 ปีที่แล้ว

    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  2 ปีที่แล้ว +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 2 ปีที่แล้ว

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

  • @usmanmsd1034
    @usmanmsd1034 2 ปีที่แล้ว

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

    • @JohanJurrius
      @JohanJurrius  2 ปีที่แล้ว +1

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

    • @usmanmsd1034
      @usmanmsd1034 2 ปีที่แล้ว

      @@JohanJurrius okay.