Reputation: 1981
I can refresh(reload) and deep link when I launch debug in IDE(vscode) However when I published to own webserver(I made web resource from this command 'flutter web build'), My webserver is intercept my url and return 404.. :( It can enter from main page only
Webserver is runing on golang and Flutter web using navigator 2.0
How can I solve this?
I can't find reference of flutter navigator 2.0 in web. Please save my life
Upvotes: 2
Views: 2078
Reputation: 2523
Please have a look at this code sample that uses new MaterialApp.router()
constructor to handle url path.
In the parseRouteInformation
of the RouteInformationParser
you get the raw url and it's up to you how are you going to interpret the data. For instance, in the above sample the route is converted to object TheAppPath
and later handled by RoutePageManager
and RouterDelegate
.
Upvotes: 1
Reputation: 1981
The problem because removed hash(#) in url
I was follow this How to remove hashtag (#) from url in web flutter but this is cause that problem When I back to original url(include hash), problem solved.
Upvotes: 1