Flutter Require In App Updates Using Riverpod

Поділитися
Вставка
  • Опубліковано 14 гру 2024

КОМЕНТАРІ • 30

  • @sigmadews5403
    @sigmadews5403 10 місяців тому +3

    Awesome tutorial! I really liked that you built the app from start and used Andrea's Riverpod architecture. I'd like to see more tutorials in this format, since his course is quite complex and you make it easier to understand.
    Could you make a tutorial where you'd be using a stream service like a connectivity listener and then show how to use it with Riverpod?

    • @1ManStartup
      @1ManStartup  10 місяців тому +2

      Good suggestion, yes I'll make something like that soon!

    • @sigmadews5403
      @sigmadews5403 10 місяців тому

      Looking forward to it @@1ManStartup!

  • @yakupSubasi
    @yakupSubasi 10 місяців тому +1

    exceptionally clean video. thanx

  • @tananga_studio
    @tananga_studio 10 місяців тому +1

    Man I love your videos. You are my favourite flutter youtuber. In this video you made a little bit too much cuts and sometimes its hard to catch differences before and after cut.

    • @1ManStartup
      @1ManStartup  10 місяців тому

      Sorry about that, the code is on GitHub to fill in what's missed but I'll be more careful in the future

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

    I don’t think you need to create another provider like you did at 5:23 You can just call the method on the repository already accessible via the provider you created. Or am I missing something here? 🤔

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

      Depending on where in the app you call it yes that could would, but the 2nd provider is a Future provider so that the Future can be called within a build method using a Consumer

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

      @@1ManStartup hmm 🤔 Then what's the point adding the method inside the repository class if you can reasonably just define its functionalities inside of the second provided method? You know: DRY? 🤔

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

      @@ugommirikwe You can define it directly in the FutureProvider and for a simple case like this that would work, however using the repository provider allows you to call it both ways ( through a consumer and as a future ) this could be useful if you needed to get the device build number in some other provider you could then call ref.read(updateRepositoryProvider).deviceBuildNum() without having to rewrite the logic.
      Another benefit of this pattern, which doesn't really apply in this situation, is since the FutureProvider is watching the RepositoryProvider if you invalidate the RepositoryProvider it will cause the FutureProvider to recall deviceBuildNum this can be useful if you need to refresh data from a backend database especially if you had multiple future providers watching that repositoryProvider, you can easily have them all update just by invalidating the repositoryProvider.

  • @daumienebi
    @daumienebi 10 місяців тому

    Is Riverpod recommend for small/medium projects?

    • @1ManStartup
      @1ManStartup  10 місяців тому

      I don't see a reason not to use it for small/ medium projects. I've been using it for my recent app which is med/large codebase and I would recommend it.

  • @chhinsras
    @chhinsras 8 місяців тому

    what about desktop ?

    • @1ManStartup
      @1ManStartup  8 місяців тому +1

      I haven't personally tested for desktop but I'd imagine you could add a conditional for the store link and it should work in a similar way.

    • @chhinsras
      @chhinsras 8 місяців тому

      @@1ManStartup in case we want to keep on our server / link to somewhere like cloud drive. then make user to install. is this possible. something like normal app is being updated

    • @1ManStartup
      @1ManStartup  8 місяців тому

      @@chhinsras I'm not sure what you mean

    • @chhinsras
      @chhinsras 8 місяців тому

      @@1ManStartup you could possibly make a video of desktop flutter. how to automatically update with store or without store (download resource from software , exe file for example)

    • @1ManStartup
      @1ManStartup  8 місяців тому +1

      @@chhinsras Great suggestion! I'll add that to my list for upcoming videos

  • @tananga_studio
    @tananga_studio 10 місяців тому

    I wonder if we cant just ask appstore or playstore about latest app version and based on this app version do something. For example if there was breaking change we are incrementing major version and if update is just stylish we can increment minor version. Is it posible to dont update this versions manually on the server? It looks problematic.

    • @1ManStartup
      @1ManStartup  10 місяців тому

      In the Play Store you can set old builds to prompt to force an upgrade, but on the App Store I haven't seen a way to do this. Let me know if you see one.
      Another thing to note with the setup in this video, if you don't update the deployed build nothing will happen. Meaning if your deployed build is 5 but you still haven't updated it since 3, people can still download the new versions they just won't see the prompt in the app about it.

  • @CodeWithImem
    @CodeWithImem 10 місяців тому

    love that.. can u explain why when i use riverpod for my app even if app close it holds too much data(60mb).. for some provider i keep them alive

    • @1ManStartup
      @1ManStartup  10 місяців тому

      How are you calculating this number? providers should be auto disposed by default but keeping some alive makes sense in some cases.

  • @loveleshagrahari3875
    @loveleshagrahari3875 8 місяців тому

    Can you create video of in app update in flutter

    • @1ManStartup
      @1ManStartup  8 місяців тому +1

      This video is already showing how to add in app updates, so I'm not sure what you're looking for?

  • @dev.faizan
    @dev.faizan 10 місяців тому

    Superb

  • @tananga_studio
    @tananga_studio 10 місяців тому

  • @winTer_x64
    @winTer_x64 10 місяців тому

    Bro make the font a bit bigger

    • @1ManStartup
      @1ManStartup  10 місяців тому +2

      I'll increase it in the next one!