larryaasen/upgrader

checkVersion

ktnishide opened this issue · 4 comments

Upgrader checkVersion is removed? what is the alternative?

Upgrader version 9.0.0

thanks

I see checkVersion right here:

void checkVersion({required BuildContext context}) {

Sorry, let me clarify.

We were using upgrader.checkVersion() to programmatically check and display alert when app return to foreground on Upgrader version 6.5.0 but now we realized the package implemented the feature.

Sorry for the misunderstanding.

I am still not quite clear on how to check version at will: checkVersion() is no longer on the Upgrader, but on AlertDialog state. What if I can't/don't want to inject the alert into my widget hierarchy?..

Unless I'm missing something, it looks like useful functionality was removed. Can you please explain?

I ended up bastardizing UpgradeAlert as follows:

  • make UpgradeAlert a plain class (not a widget)
  • conflate UpgradeAlertState with it, exposing checkVersion(), etc.
  • instantiate alert right after upgrader and use it as before (in v. 8.x.x)

All in all, this feels like a regression. Please consider bringing the original functionality back.