wait method Null safety
override
wait until action dispatching is completed. The future object is completed with the action result if the action dispatches successfully, unless it is completed with an error
Implementation
@override
Future<TResult> wait() {
final completer = Completer<TResult>();
on(
success: () => completer.complete(dispatcher.result as TResult),
error: completer.completeError,
);
return completer.future;
}