awaitSync method
T
awaitSync({
- void whileWaiting()?,
Implementation
T awaitSync({void Function()? whileWaiting}) {
whileWaiting ??= () {};
var done = true;
T? value;
then((_value) {
done = true;
value = _value;
});
while (!done) {}
return value!;
}