showPlatformAlert method

dynamic showPlatformAlert()

Implementation

showPlatformAlert() {
  currentContext = _contextKey.currentContext;
  if (currentContext != null) {
    isAlertActive = true;
    showNativeDialogue(
      currentContext!,
      () {
        isInternetBack(
          internetStatus: (status) {
            if (status) {
              isAlertActive = false;
              Navigator.pop(currentContext!);
            } else {
              Navigator.pop(currentContext!);

              Future.delayed(
                Duration(seconds: 1),
                () {
                  showPlatformAlert();
                },
              );
            }
          },
        );
      },
    );
  }
}