I need to change the content of this web page
for this content
And also change the url from "localhost:49318/#/home/inicio" to "localhost:49318/#/home/other".
All of this without using the Navigator.
In a mobile app I would change the widget shown with a set state, but doing that on a web page wouldn't change the url.
I use Fluro (a package) to control my routes, but eventually I need to change the URL without redirecting.
The solution is pretty simple
Import this:
import 'dart:html' as html;
Then in your code, use this to change the URL without affecting the current page
html.window.history.pushState(null, 'home', '#/home/other');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With