dartz
dartz copied to clipboard
Add catchAsync for Either
Like catching, but for async function bodies.
Usage:
Future<Either<dynamic, FooBar>> doAsyncThings() {
return catchAsync(() async {
final foo = await asyncAction();
final bar = await asyncAction();
return foo + bar;
});
}