Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebUrlService not compatible with Flutter Web apps deployed outside of root path #941

Open
camrongiuliani opened this issue Feb 26, 2024 · 1 comment · Fixed by savanainc/modular#1 · May be fixed by #942
Open

WebUrlService not compatible with Flutter Web apps deployed outside of root path #941

camrongiuliani opened this issue Feb 26, 2024 · 1 comment · Fixed by savanainc/modular#1 · May be fixed by #942

Comments

@camrongiuliani
Copy link

https://github.com/Flutterando/modular/blob/edc191975f51416ba52ffb6f078125dedae15f0c/flutter_modular/lib/src/presenter/navigation/modular_route_information_parser.dart#L55C5-L55C63

When a Flutter Web app is deployed somewhere other than the root of the server, for example:
https://www.example.com/flutterapps/myapp

Modular redirects to:
https://www.example.com/flutterapps/myapp/#/flutterapps/myapp/

Due to the UrlService being favored over the user defined initial route, there is no clean way to solve for this.

The only way I could find to remedy this is to use a redirect route, but this is less than ideal when the deployment path differs for multiple different clients.

When _firstParse is true, we likely need to prefer the user defined initial route, and if not specified, fallback on the UrlService.

Thoughts?

@camrongiuliani
Copy link
Author

Opened a PR for the issue mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant