Local Database For Flutter Game With Hive & Riverpod

Поделиться
HTML-код
  • Опубликовано: 20 окт 2024

Комментарии • 12

  • @SuluXuluS
    @SuluXuluS 2 месяца назад

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

  • @tocleora
    @tocleora 6 месяцев назад

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

    • @1ManStartup
      @1ManStartup  6 месяцев назад

      It's called Error Lens this is my full VS code setup ruclips.net/video/rSI3-zxJZVc/видео.html

  • @toxaq
    @toxaq 5 месяцев назад

    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  5 месяцев назад +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 5 месяцев назад

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

  • @kamil_supabase_enjoyer
    @kamil_supabase_enjoyer 18 дней назад

    I love your channel but I think that Hive is no longer updated.

    • @1ManStartup
      @1ManStartup  18 дней назад +1

      Yes it appears that way. If I were building this now, I would use shared_preferences instead of Hive - if the data being stored is all simple key/values.
      For more complex local storage I'd probably use sqflite

    • @kamil_supabase_enjoyer
      @kamil_supabase_enjoyer 18 дней назад

      @@1ManStartup Thank you for answer. You are the best!

  • @SudharshanReddyee
    @SudharshanReddyee 6 месяцев назад

    Bro how you are pushing yourself to upskill and uploading RUclips 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  6 месяцев назад

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