We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sometimes async methods of the class must be called sequentionally:
await loader.load('/file/path/1'); await loader.load('/file/path/2');
Support await in cascade notation will simplify this notation:
await
loader ..await load('/file/path/1') ..await load('/file/path/2');
Awaited and unawated/sync calling methods can be mixed:
loader ..setDestination('/destination/path') ..await load('/file/path/1') ..await load('/file/path/2') ..removeFromSource(true);
The text was updated successfully, but these errors were encountered:
this is related to #25 and #1216 .
Sorry, something went wrong.
A suffix await seems like the best choice here.
The binding of prefix-cascade-await is iffy, and doesn't generalize to other chains.
loader..await load('file').save('file')
Does this await load('file') or does it await load('file').save('file').
load('file')
load('file').save('file')
And if save is also async, will you need ..await load('file').await save('file'), meaning this is not just about cascades.
save
..await load('file').await save('file')
Allowing loader..load('file').await.save('file').await will remove the ambiguity and follow the flow.
loader..load('file').await.save('file').await
(It'd even allow a FutureOr<Null> foo = ...; bar(foo?.await); which doesn't await for null 😁)
FutureOr<Null> foo = ...; bar(foo?.await);
null
No branches or pull requests
Sometimes async methods of the class must be called sequentionally:
Support
await
in cascade notation will simplify this notation:Awaited and unawated/sync calling methods can be mixed:
The text was updated successfully, but these errors were encountered: