progressLoading static method

void progressLoading({
  1. bool dismiss = false,
})

Implementation

static void progressLoading({bool dismiss = false}) {
  showDialog(
      context: buildContext,
      routeSettings: _routeSettings,
      builder: (_) {
        return AlertDialog(
          elevation: 0,
          backgroundColor: Colors.transparent,
          content: PopScope(
            canPop: dismiss,
            onPopInvoked: (didPop) {
              if (didPop) {
                return;
              }
            },
            child: const SizedBox(
              width: 60,
              height: 60,
              child: Center(
                child: CircularProgressIndicator(),
              ),
            ),
          ),
        );
      },
      barrierDismissible: dismiss,
      barrierColor: Colors.transparent);
}