I am building a flutter web app which requires a url parameter in the start.
Currently it needs a parameter like http://localhost:49844/?id=105897
But after the app catches the url it disappears (like http://localhost:49844/#/
) from the web address bar causing the application to fail on refresh of the site. Is there a way to keep the parameter once in the Url path?
In my code I use code below to get the parameter value from the Url
String appUrl = Uri.base.queryParameters["id"].toString();
Also, I use home:
instead of routes as I only have a single page to be displayed.