Local Database For Flutter Game With Hive & Riverpod

Sdílet
Vložit
  • čas přidán 27. 08. 2024

Komentáře • 9

  • @SuluXuluS
    @SuluXuluS Před 19 dny

    These tutorials are so useful, you're saving my life
    This just made my week, thank you, you're my personal hero

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

    Thanks for the video! What addon are you using that shows you the error inline?

    • @1ManStartup
      @1ManStartup  Před 4 měsíci

      It's called Error Lens this is my full VS code setup czcams.com/video/rSI3-zxJZVc/video.html

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

    What is the benefit of using riverpod her to get a global reference to HiveRepository? Can't you just create a global final variable with an instance of the HiveRepsitory? It seems like over kill to get effectively a singleton and I've never seen the reason explained. You're not changing the hiveRepository so there is nothing to watch. I keep seeing examples like this so there must be a reason?

    • @1ManStartup
      @1ManStartup  Před 3 měsíci +1

      Good question, in this case using a global instance would work about the same. In a future video about resetting the game data Riverpod makes it easier (IMO) to show the changes to the user. But again that could be done without Riverpod and listening to hive's changes directly.
      While this example isn't using Riverpod in a way that's necessarily better, I like to use it for instances like this vs creating a global singleton - because I know later if I want to add more complex Future/Stream providers or notifiers I can.
      Some might call this over engineering - but the video is an example of one aspect of the app, and other areas of the app will be using Riverpod, so my thinking is to just use it everywhere.

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

      @@1ManStartup I’ve used their async notifier to solve a local list problem backed by an API. That was worth it. Would work will with Hive too.

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

    Bro how you are pushing yourself to upskill and uploading CZcams regularly irrespective of views and likes. I used to watch your videos in lockdown and I have developed one Android app.
    I left that project 2 years ago, i tried to work on it in between but I am not getting that push. I forgot most of the skills.

    • @1ManStartup
      @1ManStartup  Před 4 měsíci

      I made this video awhile back trying to explain how to stay motivated maybe it'll help. czcams.com/video/qkekZNjgiZ4/video.htmlsi=YFWwG2mXCH_-tHgG
      But also, it's fine to try other things than just programming apps 😎