如何在 Flutter Web 应用程序中重新加载浏览器选项卡

How to reload browser tab in a Flutter Web Application

我在 Web 上有一个 Flutter 应用程序 运行,我需要以编程方式重新加载浏览器选项卡,我想知道是否有与 html.window.close() 类似但用于重新加载的东西。在 Flutter 中有什么方法可以做到这一点吗?

使用location.reload方法

import 'package:universal_html/html.dart' as html;

FlatButton(
  child: Text('Refresh'),
  onPressed: () {
    html.window.location.reload();
  },
),