getXLoader static method

dynamic getXLoader({
  1. bool? show,
})

Implementation

static getXLoader({bool? show}) {
  if (show!) {
    isLoading = show;
    showDialog(context: navigationService.context, builder: (context) {
      return WillPopScope(
        onWillPop: () => Future.value(false),
        child: const Center(
          child:  CircularProgressIndicator(
            valueColor: AlwaysStoppedAnimation<Color>(Colors.black),
          ) ,
        ),
      );
    },);
  } else {
    if(isLoading) {
      isLoading = show;
      navigationService.back();
    }
  }
}