onUserUpdated method

void onUserUpdated(
  1. BuildContext context,
  2. bool shouldPop
)

Implementation

void onUserUpdated(BuildContext context, bool shouldPop) {
  if (widget.upgrade.debugLogging) {
    if (kDebugMode) {
      print('hcUpgrade: button tapped: update now');
    }
  }

  // If this callback has been provided, call it.
  final doProcess = widget.onUpdate?.call() ?? true;

  if (doProcess) {
    widget.upgrade.sendUserToAppStore();
  }

  if (shouldPop) {
    popNavigator(context);
  }
}