How to reload browser tab in a Flutter Web Application

Viewed 908

I have a Flutter Application running on web and I need to reload the browser tab programmatically, and I wonder if there is something similarly with html.window.close() but for reload. Is there any way to do this in Flutter?

1 Answers

Use location.reload method

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

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