doFuture<T> method
Call a future. Using Rx wrappers with subscribe method is preferable.
Implementation
@Deprecated('Use try/catch instead')
void doFuture<T>(
Future<T> future,
void Function(T value) onValue, {
void Function(Object error)? onError,
}) {
// ignore: avoid_types_on_closure_parameters
future.then(onValue).catchError((Object e) {
onError?.call(e);
});
}