Flutter Riverpod EASY Tutorial

Sdílet
Vložit
  • čas přidán 27. 07. 2024
  • Dive into the world of efficient state management with Flutter Riverpod! In this video, we'll explore the power and simplicity of Riverpod, a robust state management library for Flutter that makes managing your app's state a breeze. Whether you're a beginner looking to enhance your understanding of state management in Flutter or an experienced developer seeking a more efficient way to handle state, this video is for you! Happy coding with Flutter Riverpod!
    OVERVIEW
    0:00​ Boring talk
    0:32 Set up Riverpod
    1:00 Easy Level
    4:51 Hard Level (With a model)
    8:04 Practical Exercises (In the description)
    🔥 PRACTICAL EXERCISES 🔥
    • Riverpod Practical Exe...
    PROVIDER
    Check out our Flutter Provider tutorial here: • Flutter Provider EASY ...
    📖 CHEATSHEET 📖
    ** Riverpod set up **
    ProviderScope
    -----
    ** Easy level **
    StateProvider
    ConsumerWidget
    ref.watch(riverpod)
    ref.read(riverpod.notifier).state
    -----
    ** Hard level (With a model) **
    ChangeNotifierProvider
    ChangeNotifier
    notifyListeners
    ConsumerWidget
    ref.watch(riverpod).name
    ref.read(riverpod).changeName(newName: newValue)
    -----
    ** PS **
    Watch = Listen to changes
    Read = Don't listen to changes (Edit the value)
    RECOMMENDED VIDEOS
    Playlist of more than 200 Flutter tips: • 35 Flutter Tips That W...
    Learn Flutter in 1 hour: • Flutter Tutorial For B...
    SOCIAL MEDIA:
    Instagram : fluttermapp
    Twitter : FlutterMapp
    Website: www.fluttermapp.com
    Discord Invite: / discord
    WEBSITE
    fluttermapp.com
    #Riverpod
    #FlutterMapp
    #Flutter

Komentáře • 55

  • @ashiqulkarimchowdhury8668
    @ashiqulkarimchowdhury8668 Před 5 měsíci +6

    very straight forward , easy to understand and To the point

  • @essienjeremy7126
    @essienjeremy7126 Před 5 měsíci +4

    This was insightful and very easy to understand, thanks.

  • @ImranSiddiquiClasses
    @ImranSiddiquiClasses Před 3 měsíci

    Great Explanation Thank you.

  • @charithasds
    @charithasds Před 5 měsíci +10

    Hi, thanks for the upload 🤩 but I guess we could do a lot more with Riverpod. If you refer to ChangeNotifierProvider documentation, it says:
    Using ChangeNotifierProvider is discouraged by Riverpod and exists primarily for:
    - an easy transition from package:provider when using its ChangeNotifierProvider
    - supporting mutable state, even though immutable state is preferred
    Also maybe you can cover provider generation too using @riverpod annotation.
    On top of it all, can we have another updated video/course on Clean Architecture with actual CRUD operations (with Sqflite and/or Firestore) and Riverpod. I guess it's a need with 99% of all CZcams tutorials cover bloc 😇 This is a humble request from a huge fan of your content.

    • @FlutterMapp
      @FlutterMapp  Před 5 měsíci +4

      Thanks for the video correction! That's how we learn and improve for the future! Keep it up 🔥

  • @SaeedGamal-ph4vk
    @SaeedGamal-ph4vk Před 2 měsíci

    I liked your way simplifying riverpod.

  • @saurabhraturi7940
    @saurabhraturi7940 Před 5 měsíci +20

    Their are many providers in riverpod but you used the one that even riverpod said not to use

    • @FlutterMapp
      @FlutterMapp  Před 5 měsíci +6

      Please share with us what is wrong, what should be done instead, and why. I'm willing to make it right if it's not. 👍

    • @JulianRosental-mh7im
      @JulianRosental-mh7im Před 5 měsíci +7

      The Riverpod docs have two migration guides, one for each StateNotifier (rather new that it is discouraged)and ChangeNotifier (discouraged since a long time, only meant for easy migration from provider). Instead of StateNotifier and ChangeNotifier, Notifier or AsyncNotifier should be used.

    • @saurabhraturi7940
      @saurabhraturi7940 Před 5 měsíci

      @@FlutterMapp Using ChangeNotifierProvider is discouraged by Riverpod and exists primarily for:
      -an easy transition from provider
      -supporting mutable state, even though immutable state is preferred

    • @mazharsalam3144
      @mazharsalam3144 Před 4 měsíci +2

      CZcamsrs copy/remake from other videos, end up using legacy codes.

  • @pixobit5882
    @pixobit5882 Před 2 měsíci +1

    Thank you for this tutorial, it helped me so much understanding riverpod!

    • @pixobit5882
      @pixobit5882 Před 29 dny

      Update: I've switched to Provider. It is easier to think in Widgets than it is to think in listening or reading or whatever

  • @cyborg244
    @cyborg244 Před měsícem

    Beautifully explained. I was able to understand it perfectly and made the necessary changes to my app. Thank You

  • @ManmaySakib
    @ManmaySakib Před 2 měsíci

    Was so helpful.

  • @user-ld9ue9ye3i
    @user-ld9ue9ye3i Před 23 dny

    Broooooooo!!! Thank you a lot. Finally understand riverpod

  • @oswaldoolea2889
    @oswaldoolea2889 Před 5 měsíci

    great video, thanks. Question: in a DDD architecture the riverpod_model.dart file will go into the data or domain folder ?

  • @jihedbouchnak
    @jihedbouchnak Před měsícem

    Epic tutorial by all means

  • @EnmanuelToribio
    @EnmanuelToribio Před 17 dny

    You are a saint! ❤

  • @JSL180
    @JSL180 Před 5 měsíci +2

    Brilliant and clear guide to start replacing provider package for example, thanks. Still, state and changenotifier should not be used, instead it is better to use code generation to implement more complex and useful types of providers as the documentation suggests.

    • @oswaldoolea2889
      @oswaldoolea2889 Před 5 měsíci

      read the title of the video, code generation is not easy beginners staff

    • @JSL180
      @JSL180 Před 5 měsíci

      ​@@oswaldoolea2889 This tutorial is valid as reference and fast migration, but on new applications you should use code generation, just pointing what the actual documentation says.

  • @saiphaneeshk.h.5482
    @saiphaneeshk.h.5482 Před 5 měsíci +1

    Nice tutorial.
    But doesn't the Riverpod tell to avoid ChangeNotifier?

  • @PRO-to7il
    @PRO-to7il Před 4 měsíci

    Please make a video on flutter sqflite CRUD operation

  • @oguzhandogdu2221
    @oguzhandogdu2221 Před 4 měsíci

    Oh dear, You explain it very well ! Can you please make it in Bloc?

  • @user-lq2ip9si7y
    @user-lq2ip9si7y Před 4 měsíci

    Please make a video about flutter hooks

  • @user-di7ud4py6r
    @user-di7ud4py6r Před měsícem

    very good and clear, i hope your english is better

  • @tomcat1262
    @tomcat1262 Před 5 měsíci +1

    Next bloc and cubit😄

  • @mohamedebrahim3090
    @mohamedebrahim3090 Před měsícem

    👏👏👏👏

  • @wkjames409
    @wkjames409 Před 5 měsíci +1

    Great explanation. Made it simple for me.

  • @glrbrasil
    @glrbrasil Před 5 měsíci +1

    Could you do a similar video with code generation? I’ve mostly used riverpod like you were showing here, but since the code gen version is the most likely to stay long term it would be nice to see more examples using it. Thanks!

    • @FlutterMapp
      @FlutterMapp  Před 5 měsíci

      In the video description, you have 2 practical exercises. Is this what you meant?

    • @FlutterMapp
      @FlutterMapp  Před 5 měsíci

      Okay, after reading further comments, I think you were referring to the riverpod_generator dependency, right?

    • @glrbrasil
      @glrbrasil Před 5 měsíci

      @@FlutterMapp I’m referring to using build_runner to creste annotated providers, but probably this depends on this package you mentioned, I’d check the official docks just to be sure.

  • @RianY2K
    @RianY2K Před 5 měsíci +2

    I think it's riverpod more complicated than cubit bloc,

  • @francescofreddi4374
    @francescofreddi4374 Před 5 měsíci

    Very good video... can you made same video with most engaged riverpod's providers, please? l

    • @FlutterMapp
      @FlutterMapp  Před 5 měsíci

      Humm, can you elaborate the request please, I'm not sure to understand? Thank you

    • @francescofreddi4374
      @francescofreddi4374 Před 5 měsíci

      ​@@FlutterMapp
      Can you create a video, or serie... to explain how to use (and why) and DIFFERENCE between:
      _StateProvider and StateNotifierProvider
      or
      _AsyncNotifierProvider
      How and when is better to use that...
      is important create simple and very clear case of study (from scratch!!!!!).
      Tell you this because i have this issue when i just started to learn in existing tutorials about Riverpod.
      For me is very important "from scratch", because i can try to "enter" in your mind and understand how you think about creating things.
      Is not important good UI here, tree simple data to receive or listen it's enough
      ThankYouVeryMuch

  • @julianherrera1214
    @julianherrera1214 Před 5 měsíci

    The best answer five stars

  • @baguskto
    @baguskto Před 5 měsíci

    Thats briliant tutorial! Thanks man. Can't wait for bloc EASY tutorial

  • @massi5417
    @massi5417 Před 3 měsíci

    T’es Québécois?

  • @kamanzishema8432
    @kamanzishema8432 Před 4 měsíci

    as of now rivepod a lot has changed .... imagine having a build method in business logic.

  • @randomusername982374
    @randomusername982374 Před 5 měsíci +1

    This is just the basics.... you need to cover future and stream providers as well for beginners.

  • @rizkiaprita
    @rizkiaprita Před 5 měsíci

    watch, read?
    thats funny.
    why not use the word set and get like any state management in js

  • @AdhamFaisal875
    @AdhamFaisal875 Před 4 měsíci

    AI Text to Speech Flutter Full App

  • @Apenschi
    @Apenschi Před 4 měsíci

    Not up to date!

  • @raffb3669
    @raffb3669 Před 4 měsíci

    deprecated providers

  • @mortysmith666
    @mortysmith666 Před 5 měsíci

    Hmm, what an unnecessary state manager

  • @iamvalenci4
    @iamvalenci4 Před 4 měsíci

    out of date

  • @tsim7188
    @tsim7188 Před 5 měsíci

    Hello, I bought the Zero To Hero course and I noticed there is an updated one may you please switch me to the updated one. I messaged you on discord but no response

    • @FlutterMapp
      @FlutterMapp  Před 5 měsíci +1

      Just replied to you on Discord 🔥