UpgradeBase constructor

UpgradeBase({
  1. Key? key,
  2. AppcastConfiguration? appcastConfig,
  3. UpgraderMessages? messages,
  4. bool? debugDisplayAlways = false,
  5. bool? debugDisplayOnce = false,
  6. bool? debugLogging = false,
  7. Duration? durationToAlertAgain = const Duration(days: 3),
  8. BoolCallback? onIgnore,
  9. BoolCallback? onLater,
  10. BoolCallback? onUpdate,
  11. BoolCallback? shouldPopScope,
  12. Client? client,
  13. bool? showIgnore,
  14. bool? showLater,
  15. bool? showReleaseNotes,
  16. bool? canDismissDialog,
  17. String? countryCode,
  18. String? minAppVersion,
  19. UpgradeDialogStyle? dialogStyle = UpgradeDialogStyle.material,
  20. Widget? getCustomDialog(
    1. BuildContext context, {
    2. String? message,
    3. void onUserIgnored()?,
    4. void onUserLater()?,
    5. void onUserUpdated()?,
    6. String? releaseNotes,
    7. 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;
  }
}