CustomLoadingToast static method
Implementation
static void CustomLoadingToast({required BuildContext context}) async {
try {
if (isflushWaringbar == false) {
Navigator.of(context).pop();
}
if (isflushLoadingbar) {
isflushLoadingbar = false;
flushLoadingbar = await Flushbar(
flushbarStyle: FlushbarStyle.FLOATING,
dismissDirection: FlushbarDismissDirection.HORIZONTAL,
backgroundColor: Colors.black87.withOpacity(0.6),
flushbarPosition: FlushbarPosition.BOTTOM,
messageText: CustomTextDefaultField(label: "Loading...", color: Colors.white, maxLine: 1),
isDismissible: true,
duration: const Duration(milliseconds: 12000),
animationDuration: const Duration(milliseconds: 250),
margin: EdgeInsets.only(bottom: 10),
leftBarIndicatorColor: Colors.green,
).show(context).then((value) {
isflushLoadingbar = true;
return null;
});
}
} catch (e) {}
}