thenResult<R> method
Work.start().then((data) => data.result)
的快捷方式
它会等待Work.start完成后执行onValue
参数为WorkData.result。
无论Work成功或失败都会执行onValue
Implementation
Future<R?> thenResult<R>(FutureOr<R> Function(D? value) onValue) =>
_completer.future.then((value) => onValue(value.result));