withLoading method
withLoading.
Implementation
Future<T> withLoading(BuildContext context, [String? message]) {
if (!context.mounted) return this;
/// show.
LoadingHelper.show(context, message);
return whenComplete(() {
/// hide.
LoadingHelper.hide();
});
}