-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
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
await 报错了,请更新下教程示例 #25
Comments
需要修改为
目前运行良好 |
@mogocat 不是的,你需要把代码放到async函数中才能使用await,示例代码是片段,你可以查看工程example下的完整示例。 |
@wendux 感谢回复,我用then调用了,能正常使用。 |
抱歉我只是按照教程敲Widget上手,对这些不太熟悉。如果其他人也按照文档教程写Widget上手的话,建议还是用then,如果熟悉async和await用法,再参照example。 |
添加了一个示例
|
1 task
Closed
1 task
AlexV525
added a commit
that referenced
this issue
Feb 13, 2023
Co-authored-by: Timm Preetz <52437+tp@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
error: Undefined name 'await' in function body not marked with 'async'. (undefined_identifier_await at [android] lib/main.dart:9)
The text was updated successfully, but these errors were encountered: