UpdatWindowManager class

Inheritance

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 setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
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 setterinherited
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

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<UpdatWindowManager>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited