Pattern: Use of await
for non-Future
Issue: -
AVOID using await on anything other than a future.
Example of incorrect code:
main() async {
print(await 23);
}
Example of correct code:
main() async {
print(await Future.value(23));
}
Pattern: Use of await
for non-Future
Issue: -
AVOID using await on anything other than a future.
Example of incorrect code:
main() async {
print(await 23);
}
Example of correct code:
main() async {
print(await Future.value(23));
}