UpgradeBase constructor
UpgradeBase({
- Key? key,
- AppcastConfiguration? appcastConfig,
- UpgraderMessages? messages,
- bool? debugDisplayAlways = false,
- bool? debugDisplayOnce = false,
- bool? debugLogging = false,
- Duration? durationToAlertAgain = const Duration(days: 3),
- BoolCallback? onIgnore,
- BoolCallback? onLater,
- BoolCallback? onUpdate,
- BoolCallback? shouldPopScope,
- Client? client,
- bool? showIgnore,
- bool? showLater,
- bool? showReleaseNotes,
- bool? canDismissDialog,
- String? countryCode,
- String? minAppVersion,
- UpgradeDialogStyle? dialogStyle = UpgradeDialogStyle.material,
- Widget? getCustomDialog(
- BuildContext context, {
- String? message,
- void onUserIgnored()?,
- void onUserLater()?,
- void onUserUpdated()?,
- String? releaseNotes,
- String? title,
Implementation
UpgradeBase({
Key? key,
this.appcastConfig,
this.messages,
this.debugDisplayAlways = false,
this.debugDisplayOnce = false,
this.debugLogging = false,
Duration? durationToAlertAgain = const Duration(days: 3),
this.onIgnore,
this.onLater,
this.onUpdate,
this.shouldPopScope,
this.client,
this.showIgnore,
this.showLater,
this.showReleaseNotes,
this.canDismissDialog,
this.countryCode,
this.minAppVersion,
this.dialogStyle = UpgradeDialogStyle.material,
this.getCustomDialog,
}) : super(key: key) {
if (appcastConfig != null) {
Upgrader().appcastConfig = appcastConfig;
}
if (messages != null) {
Upgrader().messages = messages;
}
if (client != null) {
Upgrader().client = client;
}
if (debugDisplayAlways != null) {
Upgrader().debugDisplayAlways = debugDisplayAlways!;
}
if (debugDisplayOnce != null) {
Upgrader().debugDisplayOnce = debugDisplayOnce!;
}
if (debugLogging != null) {
Upgrader().debugLogging = debugLogging!;
}
if (durationToAlertAgain != null) {
Upgrader().durationUntilAlertAgain = durationToAlertAgain;
}
if (onIgnore != null) {
Upgrader().onIgnore = onIgnore;
}
if (onLater != null) {
Upgrader().onLater = onLater;
}
if (onUpdate != null) {
Upgrader().onUpdate = onUpdate;
}
if (shouldPopScope != null) {
Upgrader().shouldPopScope = shouldPopScope;
}
if (showIgnore != null) {
Upgrader().showIgnore = showIgnore!;
}
if (showLater != null) {
Upgrader().showLater = showLater!;
}
if (showReleaseNotes != null) {
Upgrader().showReleaseNotes = showReleaseNotes!;
}
if (canDismissDialog != null) {
Upgrader().canDismissDialog = canDismissDialog!;
}
if (countryCode != null) {
Upgrader().countryCode = countryCode;
}
if (minAppVersion != null) {
Upgrader().minAppVersion = minAppVersion;
}
if (dialogStyle != null) {
Upgrader().dialogStyle = dialogStyle;
}
if (getCustomDialog != null) {
Upgrader().getCustomDialog = getCustomDialog;
}
}