How to use deep link in flutter web using navigator 2.0 on my webserver?

Viewed 1371

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

2 Answers

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.

Related