#Windows update patch check

1 messages · Page 1 of 1 (latest)

topaz kraken
#

I implemented the patch update check and it is working on Android, but on Windows with the same code, the same application is not working. Could you help me with this?

final status = await updater.checkForUpdate();

      if (status == UpdateStatus.outdated) {
        showCupertinoDialog(
          context: context,
          builder: (context) {
            return CupertinoAlertDialog(
              content: Text('Nova versão disponível! \nFechando o app para aplicar as alterações... \nNecessário abrir novamente e Importar os dados'),
              actions: [
                CupertinoButton(
                  child: Text('Ok'),
                  onPressed: () {
                    Navigator.pop(context);
                  },
                )
              ],
            );
          },
        ).then((_) async {
          try {
            await updater.update();
          } finally {
            exit(0);
          }
        });
random hemlock
#

Can you say more about what you mean by "not working"? What value does status have?

topaz kraken
#

When I run my application on Windows, it is on patch 0 (although I have already released patch 1), so I do this check to close my app and open it again to apply patch 1, but it is not falling in the if (status == UpdateStatus.outdated) as true, but this only occurs on Windows, on Android this logic is working correctly.

random hemlock
#

What does it advertise as its update status?

#

If not outdated?