[英]Flutter web: how to fix white page on swipe back in IOS when app is installed to home screen
If I swipe back from a very first page of any flutter app installed to home screen from Safari I receive a blank page:如果我从 Safari 安装到主屏幕的任何 flutter 应用程序的第一页向后滑动,我会收到一个空白页面:
the swiping process picture刷卡过程图
It goes back automatically to the first page in three seconds and doesn't appear anymore until the app is reloaded.它会在三秒钟内自动返回到第一页,并且在重新加载应用程序之前不会再出现。 I used a sample flutter app without any changes to reproduce this behavior.
我使用了示例 flutter 应用程序,没有任何更改来重现此行为。
What I've tried to fix this:我试图解决这个问题:
WillPopScope
as suggested here , but it's only useful in Safari tab and doesn't have any effect on a home screen app. WillPopScope
建议,但它仅在 Safari 选项卡中有用,对主屏幕应用程序没有任何影响。 I tried to wrap Scaffold
of a home widget and the whole app just to check.Scaffold
和整个应用程序只是为了检查。Navigator
weren't helpful. Navigator
的任何技巧都没有帮助。 If I try to pop anything from a home page like this: Navigator.of(context).pop();
Navigator.pushReplacement(context,
new MaterialPageRoute(builder: (context) => MyHomePage()));
, i (obviously) receive an error: Navigator has no active routes to replace.
,我(显然)收到一个错误:
Navigator has no active routes to replace.
fullscreenDialog: true
parameter in MaterialPageRoute
when navigated to the next page but the blank page on swipe back remains.MaterialPageRoute
中使用fullscreenDialog: true
参数,但向后滑动时空白页面仍然存在。 How to get rid of this behavior properly?如何正确摆脱这种行为?
I am having the same problem and I believe this has not been solved yet.我有同样的问题,我相信这还没有解决。 Looks to be tracked by this (and related) issue: https://github.com/flutter/flutter/issues/76478
看起来被这个(和相关的)问题跟踪: https://github.com/flutter/flutter/issues/76478
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.