I have implemented app links in Flutter by following this doc. I have tested my app on Android and tapping on the app link always leads me to the root
route, which is my app's home page.
I tested the same link on the web and the navigation worked fine and it took me to the route requested by the app link. I had to add /#/
at the end of the url for web.
The GoRouter config works fine on the web but fails on Android.
Do I need to manage routes inside the assetlinks.json
file?
This is my router's config
GoRouter(
routes: [
GoRoute(
path: '/',
builder: (_, __) => Scaffold(
appBar: AppBar(title: const Text('Home Screen')),
),
routes: [
GoRoute(
path: 'dashboard',
builder: (_, __) => Scaffold(
appBar: AppBar(title: const Text('Dashboard Screen')),
),
),
],
),
],
)