AppHubUpgrader class

Main controller class for checking app updates and displaying update dialogs

Constructors

AppHubUpgrader({String? appID, GlobalKey<NavigatorState>? navigatorKey, BuildContext? context, bool? useProduction, UpdateDialogConfig? dialogConfig})
Create an instance of AppHubUpgrader

Properties

dialogConfig → UpdateDialogConfig?
final
hashCode → int
The hash code for this object.
no setterinherited
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
useProduction → bool
final

Methods

checkForUpdate({BuildContext? context, String? platform, String? currentVersion, bool showDialog = true, bool checkOnly = false}) → Future<UpdateInfo?>
Check for app updates and automatically show dialog if update is available
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
showUpdateDialog(UpdateInfo updateInfo, [BuildContext? context]) → Future<void>
Show update dialog manually
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

initializedAppID → String?
Get the initialized app ID
no setter
isInitialized → bool
Check if AppHubUpgrader has been initialized
no setter

Static Methods

initialize({required String appID, GlobalKey<NavigatorState>? navigatorKey, BuildContext? context, bool useProduction = true, UpdateDialogConfig? dialogConfig}) → void
Initialize AppHubUpgrader with global parameters