loadingTask static method
Implementation
static Future loadingTask(Future Function() fun,
{Function(dynamic)? error}) async {
EasyLoading.show();
try {
await fun();
} catch (e) {
print('$e');
error?.call(e);
}
EasyLoading.dismiss();
}