Home > OS >  How to check if App has brought new update in Flutter?
How to check if App has brought new update in Flutter?

Time:09-20

When I update the application on google play in the application that I have published with flutter and connected with API ends, I want the user to be notified when the application is opened.

CodePudding user response:

You need new_version package. it will update the user with dialog box with your custom message

here is the sample code make sure androidId:"put your app id here" is correct,

final newVersion = NewVersion(androidId:"put your app id here");
    final status = await newVersion.getVersionStatus();
    if (status != null) {
  print('Store version (${status.storeVersion}) and local Version(${status.localVersion}) ');

  if (status.storeVersion != status.localVersion)
     newVersion.showUpdateDialog(
        context: context,
        versionStatus: status,
        dialogTitle: 'Your Custom Title',
        dialogText: 'your Custom Text',
      );
  • Related