onConnectionRestored method

  1. @override
void onConnectionRestored()
override

Implementation

@override
void onConnectionRestored() {
  if (connectivityDisplayType == ConnectivityDisplayType.snackBar) {
    ScaffoldMessenger.of(context).hideCurrentSnackBar();
    hasPushed = false;
    return;
  }

  if (hasPushed && Navigator.canPop(context)) {
    Navigator.pop(context);
    hasPushed = false;
    return;
  }
}