添加异步和等待后,这两行出现问题,等待行中出现新的两个错误
“该表达式的类型为‘void’,因此无法使用其值。”
这是有问题的代码
void onTextFieldSubmitted(String input) async {
await fetchSearch(input);
await fetchLocation();
}
Run Code Online (Sandbox Code Playgroud)
你可以在这里看到源代码 https://github.com/Akhele/Flutter-Weather-App/blob/master/lib/main.dart