Flutter Riverpod EASY Tutorial

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

КОМЕНТАРІ • 53

  • @saurabhraturi7940
    @saurabhraturi7940 4 місяці тому +20

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

    • @FlutterMapp
      @FlutterMapp  4 місяці тому +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 4 місяці тому +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 4 місяці тому

      @@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 3 місяці тому +1

      UA-camrs copy/remake from other videos, end up using legacy codes.

  • @user-ld9ue9ye3i
    @user-ld9ue9ye3i 18 годин тому

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

  • @ashiqulkarimchowdhury8668
    @ashiqulkarimchowdhury8668 4 місяці тому +5

    very straight forward , easy to understand and To the point

  • @oswaldoolea2889
    @oswaldoolea2889 4 місяці тому

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

  • @cyborg244
    @cyborg244 Місяць тому

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

  • @essienjeremy7126
    @essienjeremy7126 4 місяці тому +4

    This was insightful and very easy to understand, thanks.

  • @jihedbouchnak
    @jihedbouchnak 12 днів тому

    Epic tutorial by all means

  • @SaeedGamal-ph4vk
    @SaeedGamal-ph4vk Місяць тому

    I liked your way simplifying riverpod.

  • @pixobit5882
    @pixobit5882 2 місяці тому +1

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

    • @pixobit5882
      @pixobit5882 6 днів тому

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

  • @ImranSiddiquiClasses
    @ImranSiddiquiClasses 2 місяці тому

    Great Explanation Thank you.

  • @charithasds
    @charithasds 4 місяці тому +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 UA-cam tutorials cover bloc 😇 This is a humble request from a huge fan of your content.

    • @FlutterMapp
      @FlutterMapp  4 місяці тому +4

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

  • @ManmaySakib
    @ManmaySakib 2 місяці тому

    Was so helpful.

  • @user-di7ud4py6r
    @user-di7ud4py6r Місяць тому

    very good and clear, i hope your english is better

  • @saiphaneeshk.h.5482
    @saiphaneeshk.h.5482 4 місяці тому +1

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

  • @JSL180
    @JSL180 4 місяці тому +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 4 місяці тому

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

    • @JSL180
      @JSL180 4 місяці тому

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

  • @oguzhandogdu2221
    @oguzhandogdu2221 3 місяці тому

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

  • @user-lq2ip9si7y
    @user-lq2ip9si7y 4 місяці тому

    Please make a video about flutter hooks

  • @PRO-to7il
    @PRO-to7il 3 місяці тому

    Please make a video on flutter sqflite CRUD operation

  • @mohamedebrahim3090
    @mohamedebrahim3090 9 днів тому

    👏👏👏👏

  • @tomcat1262
    @tomcat1262 4 місяці тому +1

    Next bloc and cubit😄

  • @RianY2K
    @RianY2K 4 місяці тому +2

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

  • @baguskto
    @baguskto 4 місяці тому

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

  • @wkjames409
    @wkjames409 4 місяці тому +1

    Great explanation. Made it simple for me.

  • @francescofreddi4374
    @francescofreddi4374 4 місяці тому

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

    • @FlutterMapp
      @FlutterMapp  4 місяці тому

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

    • @francescofreddi4374
      @francescofreddi4374 4 місяці тому

      ​@@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

  • @glrbrasil
    @glrbrasil 4 місяці тому +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  4 місяці тому

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

    • @FlutterMapp
      @FlutterMapp  4 місяці тому

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

    • @glrbrasil
      @glrbrasil 4 місяці тому

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

  • @julianherrera1214
    @julianherrera1214 4 місяці тому

    The best answer five stars

  • @massi5417
    @massi5417 3 місяці тому

    T’es Québécois?

  • @kamanzishema8432
    @kamanzishema8432 3 місяці тому

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

  • @randomusername982374
    @randomusername982374 4 місяці тому +1

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

  • @rizkiaprita
    @rizkiaprita 4 місяці тому

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

  • @AdhamFaisal875
    @AdhamFaisal875 4 місяці тому

    AI Text to Speech Flutter Full App

  • @Apenschi
    @Apenschi 3 місяці тому

    Not up to date!

  • @raffb3669
    @raffb3669 4 місяці тому

    deprecated providers

  • @mortysmith666
    @mortysmith666 4 місяці тому

    Hmm, what an unnecessary state manager

  • @iamvalenci4
    @iamvalenci4 4 місяці тому

    out of date

  • @tsim7188
    @tsim7188 4 місяці тому

    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  4 місяці тому +1

      Just replied to you on Discord 🔥