Flutter Web-如何重新加载当前活动页面 [英] Flutter Web - How to reload currently Active Page

查看:1155
本文介绍了Flutter Web-如何重新加载当前活动页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Flutter开发网站。 Flutter一切正常,除了重新加载页面时。当我按下浏览器中的刷新按钮时,整个Web应用程序都将重新加载。

I am using Flutter for developing a website. Everything is working fine with Flutter except when it comes to reloading the page. When I press the refresh button in the browser, the whole web app gets reloaded.

例如,如果我从初始页面导航到四个页面,从第四页刷新按钮,将加载初始页面,我将不得不再次手动浏览到第四页。

For example, if I have navigated to four pages from the initial page, when I press the refresh button from the fourth page, the initial page gets loaded and I'll have to manually browse all the way to the fourth page again.

有什么方法可以加载Flutter中当前活动的页面?

Is there any way to load the currently active page in Flutter?

推荐答案

使用已命名路由,因为它在使用Flutter Web时可以无缝地映射URL。

Check out navigation with named routes as it maps URLs seamlessly when using Flutter Web.

这篇关于Flutter Web-如何重新加载当前活动页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆