showProgressDialog static method
common method for showing progress dialog
Implementation
static void showProgressDialog(
{BuildContext? context, isCancellable = false}) async {
if (!isProgressVisible &&
NavigatorService.navigatorKey.currentState?.overlay?.context != null) {
showDialog(
barrierDismissible: isCancellable,
context: NavigatorService.navigatorKey.currentState!.overlay!.context,
builder: (BuildContext context) {
return const Center(
child: CircularProgressIndicator.adaptive(
strokeWidth: 4,
valueColor: AlwaysStoppedAnimation<Color>(
Colors.white,
),
),
);
});
isProgressVisible = true;
}
}