UpdatWindowManager class
Constructors
UpdatWindowManager ({required String currentVersion , required Future <String ? > getLatestVersion (), required Future <String > getBinaryUrl (String ? latestVersion ), required String appName , Future <File > getDownloadFileLocation (String ? latestVersion )?, Widget updateChipBuilder ({required String appVersion , required void checkForUpdate (), required BuildContext context , required void dismissUpdate (), required String ? latestVersion , required Future <void > launchInstaller (), required void openDialog (), required void startUpdate (), required UpdatStatus status })?, void updateDialogBuilder ({required String appVersion , required String ? changelog , required void checkForUpdate (), required BuildContext context , required void dismissUpdate (), required String ? latestVersion , required Future <void > launchInstaller (), required void openDialog (), required void startUpdate (), required UpdatStatus status })?, Future <String ? > getChangelog (String latestVersion , String appVersion )?, void callback (UpdatStatus status )?, bool openOnDownload = false , bool closeOnInstall = false , bool launchOnExit = true , Key ? key , 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.
const
Properties
appName
→ String
The name of the app.
final
callback
→ void Function(UpdatStatus status ) ?
final
child
→ Widget
final
closeOnInstall
→ bool
If true, the app will be closed when the installer is launched.
final
currentVersion
→ String
Current version of the app. This will be used to compare the latest version. The String must be a semantic version.
final
getBinaryUrl
→ Future <String > Function(String ? latestVersion )
Get the url of the binary file to download provided with a certain version.
final
getChangelog
→ Future <String ? > Function(String latestVersion , String appVersion ) ?
This function will be invoked if there is a new release to get the changes.
final
getDownloadFileLocation
→ Future <File > Function(String ? latestVersion ) ?
Override the default download location.
final
getLatestVersion
→ Future <String ? > Function()
This function will be invoked to ckeck if there is a new version available. The return string must be a semantic version.
final
hashCode
→ int
The hash code for this object.
no setter inherited
key
→ Key ?
Controls how one widget replaces another widget in the tree.
final inherited
launchOnExit
→ bool
If true, the installer will be launched when the app is closed.
final
openOnDownload
→ bool
If true, the installer will be opened when the update is downloaded.
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
updateChipBuilder
→ Widget Function({required String appVersion , required void checkForUpdate (), required BuildContext context , required void dismissUpdate (), required String ? latestVersion , required Future <void > launchInstaller (), required void openDialog (), required void startUpdate (), required UpdatStatus status }) ?
This Function can be used to override the default chip shown when there is a new version available.
final
updateDialogBuilder
→ void Function({required String appVersion , required String ? changelog , required void checkForUpdate (), required BuildContext context , required void dismissUpdate (), required String ? latestVersion , required Future <void > launchInstaller (), required void openDialog (), required void startUpdate (), required UpdatStatus status }) ?
This Function can be used to override the default dialog shown when there is a new version available. You must call showDialog
yourself.
final