I am trying to get the flutter web app to append query param to the end of the url (when a selection is made in UI) without reloading the page
Basically I would like to update the URL from http://127.0.0.1:8080/#/sites to http://127.0.0.1:8080/#/sites?arg=1 without page reload
The following line (import 'dart:html') does not work in flutter (The URL does not change at all)
window.history.pushState(null, null, '?arg1=1');
I have also tried the js package (https://pub.dev/packages/js) and it does not work either.
Is there a way to get this to work in flutter web or are there any alternatives to achieve my requirement?