You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the following example:
FutureBuilder(
future: AFutureFunctionCall(),
builder: (context, snapshot) { ... }
)
where lints have discarded_futures: true
Error:
Asynchronous function invoked in a non-'async' function. Try converting the enclosing function to be 'async' and then 'await' the future.
and then we have to use
FutureBuilder(
// ignore: discarded_futures
future: AFutureFunctionCall(),
while this is not really expected. The original error does not seem to be right.
Expected fix
The warning is not wrong
Additional context
No response
I would like to fix this problem.
I will try and fix this problem on dart.dev.
The text was updated successfully, but these errors were encountered:
Page URL
https://dart.dev/tools/linter-rules/discarded_futures.html
Page source
https://github.com/dart-lang/site-www/tree/main/src/content/tools/linter-rules/individual-rules.md
Describe the problem
In the following example:
FutureBuilder(
future: AFutureFunctionCall(),
builder: (context, snapshot) { ... }
)
where lints have discarded_futures: true
Error:
Asynchronous function invoked in a non-'async' function. Try converting the enclosing function to be 'async' and then 'await' the future.
and then we have to use
FutureBuilder(
// ignore: discarded_futures
future: AFutureFunctionCall(),
while this is not really expected. The original error does not seem to be right.
Expected fix
The warning is not wrong
Additional context
No response
I would like to fix this problem.
The text was updated successfully, but these errors were encountered: