completeOnceWith method
Implementation
Future<bool> completeOnceWith(FutureOr<T> Function() fn) async {
if (!isCompleted) {
try {
return completeOnce(await fn());
} catch (e) {
return completeOnceError(e);
}
} else {
return false;
}
}