dismissLoading static method

Future<void> dismissLoading({
  1. int delay = 0,
})

Implementation

static Future<void> dismissLoading({int delay = 0}) async {
  if (_isShowLoading) {
    if (delay == 0) {
      _isShowLoading = false;
      Get.back();
    } else {
      _isShowLoading = false;
      await Future.delayed(Duration(milliseconds: delay), () async {
        Get.back();
      });
    }
  }
}