Upgrader class
A singleton class to configure the upgrade dialog.
Constructors
- Upgrader()
-
factory
Properties
- appcast ↔ Appcast?
-
Provide an Appcast that can be replaced for mock testing.
getter/setter pair
- appcastConfig ↔ AppcastConfiguration?
-
The appcast configuration (AppcastConfiguration) used by Appcast.
When an appcast is configured for iOS, the iTunes lookup is not used.
getter/setter pair
- canDismissDialog ↔ bool
-
Can alert dialog be dismissed on tap outside of the alert dialog. Not used by UpgradeCard. (default: false)
getter/setter pair
- client ↔ Client?
-
Provide an HTTP Client that can be replaced for mock testing.
getter/setter pair
- countryCode ↔ String?
-
The country code that will override the system locale. Optional. Used only for iOS.
getter/setter pair
- debugDisplayAlways ↔ bool
-
For debugging, always force the upgrade to be available.
getter/setter pair
- debugDisplayOnce ↔ bool
-
For debugging, display the upgrade at least once once.
getter/setter pair
- debugLogging ↔ bool
-
Enable print statements for debugging.
getter/setter pair
- dialogStyle ↔ UpgradeDialogStyle?
-
The upgrade dialog style. Optional. Used only on UpgradeAlert. (default: material)
getter/setter pair
- durationUntilAlertAgain ↔ Duration
-
Duration until alerting user again
getter/setter pair
- getCustomDialog ↔ (Widget? Function(BuildContext context, {String? message, void onUserIgnored()?, void onUserLater()?, void onUserUpdated()?, String? releaseNotes, String? title})?)
-
The function which returns the custom widget to be shown
in place of default alert dialogs
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- messages ↔ UpgraderMessages?
-
The localized messages used for display in upgrader.
getter/setter pair
- minAppVersion ↔ String?
-
The minimum app version supported by this app. Earlier versions of this app
will be forced to update to the current version. Optional.
getter/setter pair
- notInitializedExceptionMessage → String
-
final
- onIgnore ↔ BoolCallback?
-
Called when the ignore button is tapped or otherwise activated.
Return false when the default behavior should not execute.
getter/setter pair
- onLater ↔ BoolCallback?
-
Called when the later button is tapped or otherwise activated.
Return false when the default behavior should not execute.
getter/setter pair
- onUpdate ↔ BoolCallback?
-
Called when the update button is tapped or otherwise activated.
Return false when the default behavior should not execute.
getter/setter pair
- operatingSystem ↔ String
-
The target operating system.
getter/setter pair
- platform ↔ TargetPlatform
-
The target platform.
getter/setter pair
- releaseNotes → String?
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldPopScope ↔ BoolCallback?
-
Called when the user taps outside of the dialog and canDismissDialog
is false. Also called when the back button is pressed. Return true for
the screen to be popped. Not used by UpgradeCard.
getter/setter pair
- showIgnore ↔ bool
-
Hide or show Ignore button on dialog (default: true)
getter/setter pair
- showLater ↔ bool
-
Hide or show Later button on dialog (default: true)
getter/setter pair
- showReleaseNotes ↔ bool
-
Hide or show release notes (default: true)
getter/setter pair
Methods
-
alreadyIgnoredThisVersion(
) → bool -
appName(
) → String -
belowMinAppVersion(
) → bool - Is installed version below minimum app version?
-
blocked(
) → bool -
checkVersion(
{required BuildContext context}) → void - Only called by UpgradeAlert.
-
clearSavedSettings(
) → Future< bool> -
currentAppStoreListingURL(
) → String? -
currentAppStoreVersion(
) → String? -
currentInstalledVersion(
) → String? -
findCountryCode(
{BuildContext? context}) → String? -
Determine the current country code, either from the context, or
from the system-reported default locale of the device. The default
is
US
. -
initialize(
) → Future< bool> -
installAppStoreListingURL(
String url) → void -
installAppStoreVersion(
String version) → void -
installPackageInfo(
{PackageInfo? packageInfo}) → void -
isTooSoon(
) → bool -
isUpdateAvailable(
) → bool -
message(
) → String -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onUserIgnored(
BuildContext context, bool shouldPop) → void -
onUserLater(
BuildContext context, bool shouldPop) → void -
onUserUpdated(
BuildContext context, bool shouldPop) → void -
saveLastAlerted(
) → Future< bool> -
shouldDisplayReleaseNotes(
) → bool -
shouldDisplayUpgrade(
) → bool -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
resetSingleton(
) → void