showOverlayWhenUnavailableNetwork method

Future<bool> showOverlayWhenUnavailableNetwork(
  1. UnavailableNetworkAlertBuilder alertUnavailableNetwork
)

网络不可用 时 弹出 Overlay 禁止操作

Implementation

Future<bool> showOverlayWhenUnavailableNetwork(
    UnavailableNetworkAlertBuilder alertUnavailableNetwork) async {
  if (!networkAvailability) {
    _connectivityOverlay ??=
        alertUnavailableNetwork(networkAvailability, _currentStatus);
  } else {
    _connectivityOverlay?.removeEntry();
    _connectivityOverlay = null;
  }
  return true;
}