Flutter Riverpod, A Reactive Caching and Data-binding Framework

Поділитися
Вставка
  • Опубліковано 4 лют 2025
  • Riverpod is an awesome package that you can use in your Flutter application.
    Compile safe
    No more ProviderNotFoundException or forgetting to handle loading states. Using Riverpod, if your code compiles, it works.
    Provider, without its limitations
    Riverpod is inspired by Provider but solves some of it's key issues such as supporting multiple providers of the same type; awaiting asynchronous providers; adding providers from anywhere, ...
    Doesn't depend on Flutter
    Create/share/tests providers, with no dependency on Flutter. This includes being able to listen to providers without a BuildContext.
    Access to slides: slides.com/mha...

КОМЕНТАРІ • 22

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

    خیلی سر راست و عالی بود توضیحات. ممنون.

  • @RandalLSchwartz
    @RandalLSchwartz 2 роки тому +4

    You can also use Fast Immutable Collections to quickly convert a list or hash or set into an immutable object that has overloaded == and hash to use for family values.

  • @vibe2943
    @vibe2943 2 роки тому +1

    i like dart way of intro .. awesome

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

    Great explanations

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

    Great content! Nice and precise, covering most of the core providers in flutter riverpod. What's the difference between fluter riverpod and hooks riverpod?

  • @UsamaKarim
    @UsamaKarim 2 роки тому +1

    Alert! Full riverpod documentation + lifetime experience is going to explode in just one hour.

  • @kenng2029
    @kenng2029 2 роки тому +1

    Thanks for this awesome talk Majid, would you be able to do a similar one on flutter hooks? I use them but I am interested to know if there's any valuable information you can share about those!

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

    Awesome Majod

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

    Doing god’s work

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

    Riverpod🤩

  • @ani-singh
    @ani-singh 2 роки тому

    Default behavior: keep the old state
    .autoDispose disposes the old state
    ref.keepAlive() keeps the old state
    Then what is the logic behind uisng .autoDispose and ref.keepAlive() together?

    • @mhadaily
      @mhadaily  2 роки тому +1

      Imaagine, you have a http request and you want to fire it up when you enter and cancel when you leave a page, however, when the HTTP call is successful, you do not want to do that again when you enter and leave a page. in this case, you can use autoDispose to cancel the HTTP but if you preserve the state, next time you enter it will not fire it up again and you have the state of the call already. does it make sense?

    • @ani-singh
      @ani-singh 2 роки тому

      @@mhadaily Correct me if I am Wrong:
      1) Without autoDispose, no state is not preserved.
      2) With autoDispose, successful state is preserved but unsuccessful state is automatically disposed.
      3) Not clear about ref.keepAlive()

    • @mhadaily
      @mhadaily  2 роки тому +2

      @@ani-singh
      1) no that is not correct, state are preserved actually, autoDispose will destroy them, check my example that I mentioned
      2) again, not exactly! if you have a HTTP call and that is success then the response can be preserved as state and you can retrvied with in autodispose without calling the HTTP again and that is the purposes of number 3 in your comment (next one)
      3) keepAlive() in Riverpod 2.0 in .autoDispose() will make your state to be cached and anytime you come retrieve it it comes from a cache. Check out my example that I mentioned again. the HTTP call.

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

      @@mhadaily ref.keepAlive() usecase is still not very clear to me after reading above comments.
      1. If a provider without autoDispose() caches the state and do not fire the request again, why do I need autoDispose() and then keepAlive()?

  • @motasimfuad7762
    @motasimfuad7762 2 роки тому +1

    Which one do you prefer overall for all types of applications?
    BLoC or Riverpod?
    I know bloc in a moderate level. But don't know provider/riverpod. Should I learn riverpod?

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

      It depends, however, I think riverpod will fits any size application with any complexity.

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

      @@mhadaily Thanks

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

    Can't download offline plz make it offline downlodable

    • @mhadaily
      @mhadaily  2 роки тому +2

      I am sorry I don't think it's something that I can do, it's actually UA-cam.