wait method Null safety
override
wait until action dispatching is completed
Implementation
@override
Future<TResult> wait() {
if (dispatcher.error != null) {
return Future.error(dispatcher.error!);
}
return Future.value(dispatcher.result as TResult);
}