我的Flutter应用里有个按钮
onPressed: () async {
try {
final newUser = await _auth.createUserWithEmailAndPassword(email: email, password: password);
if (newUser.user != null) {
await Future.delayed(Duration.zero);
Navigator.of(context).pushNamed(ChatScreen.id);
}
} catch (e) {
print(e);
}
},
IDE报告"不要跨同步间隙使用BuildContext." 我做错了什么?