withLoading method
Implementation
Future<T> withLoading([String? message, Duration timeout = const Duration(minutes: 5)]) async {
GlobalLoadingView.show(message);
try {
T result = await this.timeout(timeout);
GlobalLoadingView.dismiss();
return result;
} catch (e) {
GlobalLoadingView.dismiss();
rethrow;
}
}