larryaasen / upgrader

A Flutter package for prompting users to upgrade when there is a newer version of the app in the store.
MIT License
547 stars 268 forks source link

Upgrader can be bypassed by offline mode #231

Open ahmetcj4 opened 1 year ago

ahmetcj4 commented 1 year ago

When user turns off internet connection before opening app and turns on internet after app initializes, upgrader popup doesn't shown.

larryaasen commented 1 year ago

That is a valid observation.

alvindrakes commented 1 year ago

What is the proposed solution for this scenario?

Should we auto check again based on the status of the network connection?

larryaasen commented 1 year ago

@alvindrakes @ahmetcj4 The callback willDisplayUpgrade is always called and when there is no network connection, the parameter appStoreVersion will be null. You could prevent your app from running until after this is called with a non-null value for appStoreVersion.

joymyr commented 1 year ago

My issue is the opposite. willDisplayUpgrade is not called at all when there's no network, so the app is stuck. @larryaasen How can I make sure willDisplayUpgrade is called?