启动后,我正在尝试处理我的应用程序的屏幕。
预期的路线是:
boot -> check if is logged in -> if yes -> navigator.push() to MainWindow.
boot -> check if is logged in -> no snapshot data -> navigator.push() to LoadingScreen.
boot -> check if is logged in -> if no -> navigator.push() to LoginScreen.
函数在Ma
因此,我基本上是在试着检查用户是否在我的颤音应用程序中看到了Intro页面。如果他们已经看过了,我希望他们被引导到Login()页面。否则,我希望它们被定向到IntroScreen()页面。
但是,我得到了以下错误:Unhandled Exception: Navigator operation requested with a context that does not include a Navigator. E/flutter (13982): The context used to push or pop routes from the Navigator must be that o
当通过单击showBottomSheet弹出一个屏幕导航到另一个屏幕时,会通过以下代码抛出此错误。我不明白为什么会发生这种情况。
class _CheckoutButtonState extends State<_CheckoutButton> {
final GlobalKey<ScaffoldState> _globalKey = GlobalKey();
final DateTime deliveryTime = DateTime.now().add(Duration(minutes: 30));
final double deliveryPrice
我尝试在Navigator.pop上重新加载我的页面,然后我这样做: Flutter - How to get notified when the page I pushed was popped by back button? 但在我的父页面中,我会这样做: refresh() async{
await _immagineBloc.getNomiImmagini(_deviceName);
setState(() {
_index = 0;
});
} 这不会在selectPhoto初始化状态中返回: Widget build(BuildContext context)
我想要创建一个加载程序数据,在数据加载的最后,屏幕将自动更改屏幕(使用Navigator)。
但我有一些问题。
Unhandled Exception: NoSuchMethodError: The method 'ancestorStateOfType' was called on null.
在方法"getDataOfUser()“的末尾,"print(a)”执行得很好,但是当它试图更改屏幕时,它会崩溃,我有以下错误:
E/flutter (32148): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhand
今天我更新了我经常使用的android模拟器,由于某种原因,我得到了这个错误。我已经更新了所有可能的依赖项和包。
I/FirebaseAuth(11346): [FirebaseAuth:] Preparing to create service connection to fallback implementation
W/System (11346): Ignoring header X-Firebase-Locale because its value was null.
E/flutter (11346): [ERROR:flutter/lib/ui/ui_dart_state.cc
在用户按下AlertDialog上的按钮后,我调用了Navigator.push()。但当用户按下按钮AlertDialog时,它将保持打开状态,并位于新页面的顶部。 用户按下按钮后如何解除AlertDialog? Future<void> _showMyDialog() async {
return showDialog<void>(
context: context,
barrierDismissible: false, // user must tap button!
b