call method
Future
call(
- ResultModel either,
- Sink<
BaseBlocPrimaryState> ? sinkState, { - Function? execute,
- Function? onError,
override
Implementation
@override
Future<dynamic> call(final either, Sink<BaseBlocPrimaryState>? sinkState,
{Function? execute, Function? onError}) async {
if (either is Error) {
LoggerDefault.log.e(either.message);
sinkState!.add(ErrorState(error: either));
if (onError != null) onError();
} else if (execute != null) {
return await execute();
}
}