handleAsync<T> method
Implementation
Future<T> handleAsync<T>(Future<T> Function() operation) async {
try {
hasError = false;
update();
return await operation();
} catch (e) {
error = e;
hasError = true;
update();
rethrow;
} finally {
update();
}
}