convertResponseToState method
Future<Either<GeneralFailure, Data> >
convertResponseToState(
- Event event,
- FutureArgAction<
Data, Event> requestAction
override
Implementation
@override
Future<Either<GeneralFailure, Data>> convertResponseToState(
Event event,
FutureArgAction<Data, Event> requestAction,
) async {
try {
return right(await requestAction(event));
} catch (e, st) {
return left(GeneralFailure(error: e, stackTrace: st));
}
}