updateLoading method

void updateLoading(
  1. BuildContext context,
  2. String loadingContent, {
  3. bool backDismissible = true,
})

Implementation

void updateLoading(BuildContext context, String loadingContent, {bool backDismissible = true}) {
  // mRequestTimes++;
  //
  // if (mRequestTimes == 1) {
  showDialog(
      context: context,
      barrierDismissible: false,
      barrierColor: Http().httpDioConfig.loadingConfig!.backgroundColor,
      builder: (BuildContext context) {
        return PopScope(
            canPop: backDismissible,
            child: LoadingDialog(
              // key: _formKey,
              showContent: loadingContent == null || loadingContent == "" ? false : true,
              backgroundColor: Http().httpDioConfig.loadingConfig!.loadingViewBackgroundColor,
              content: loadingContent,
              loadingColor: Http().httpDioConfig.loadingConfig!.loadingIconColor,
              loadingView: Http().httpDioConfig.loadingConfig!.loadingView!,
            ));
      });

  // SmartDialog.showLoading( );

  // }
}