UpdatWindowManager constructor

const UpdatWindowManager({
  1. required String currentVersion,
  2. required Future<String?> getLatestVersion(),
  3. required Future<String> getBinaryUrl(
    1. String? latestVersion
    ),
  4. required String appName,
  5. Future<File> getDownloadFileLocation(
    1. String? latestVersion
    )?,
  6. Widget updateChipBuilder({
    1. required String appVersion,
    2. required void checkForUpdate(),
    3. required BuildContext context,
    4. required void dismissUpdate(),
    5. required String? latestVersion,
    6. required Future<void> launchInstaller(),
    7. required void openDialog(),
    8. required void startUpdate(),
    9. required UpdatStatus status,
    })?,
  7. void updateDialogBuilder({
    1. required String appVersion,
    2. required String? changelog,
    3. required void checkForUpdate(),
    4. required BuildContext context,
    5. required void dismissUpdate(),
    6. required String? latestVersion,
    7. required Future<void> launchInstaller(),
    8. required void openDialog(),
    9. required void startUpdate(),
    10. required UpdatStatus status,
    })?,
  8. Future<String?> getChangelog(
    1. String latestVersion,
    2. String appVersion
    )?,
  9. void callback(
    1. UpdatStatus status
    )?,
  10. bool openOnDownload = false,
  11. bool closeOnInstall = false,
  12. bool launchOnExit = true,
  13. Key? key,
  14. required Widget child,
})

UpdatWindowManager is designed to make automatic update handling simple. The update is (by default) automatically downloaded and the user is notified that the update is ready. Then, the user may decide to install or dismiss the update. Even if the update is dismissed the installer will then launch just before the app is closed. This widget is ideal to use with silent installes such as msi on Windows as the update will start without user interaction in the bakground.

Implementation

const UpdatWindowManager({
  required this.currentVersion,
  required this.getLatestVersion,
  required this.getBinaryUrl,
  required this.appName,
  this.getDownloadFileLocation,
  this.updateChipBuilder,
  this.updateDialogBuilder,
  this.getChangelog,
  this.callback,
  this.openOnDownload = false,
  this.closeOnInstall = false,
  this.launchOnExit = true,
  Key? key,
  required this.child,
}) : super(key: key);