hideLoading method
Implementation
Future hideLoading() async {
if (!_showLoading) return;
if (Navigator.of(context).canPop()) {
await Future.delayed(const Duration(milliseconds: 300), () {});
if (_navigator.mounted) {
await Navigator.of(context).maybePop();
}
}
_showLoading = false;
}