I’m having trouble creating deeplinks with app_links.
Package: https://pub.dev/packages/app_links
Widget build(BuildContext context) {
return MaterialApp(
navigatorKey: _navigatorKey,
initialRoute: "/",
onGenerateRoute: (RouteSettings settings) {
Widget routeWidget = defaultScreen();
String? routeName = settings.name;
if (routeName == '/reset-password/') {
// redirect to Reset Password Page
} else {
// redirect to Home Page
}
What I want is if I click on the link that contains the url "reset-password"
Ex: https://mywebsite.com/setting/reset-password/[email protected]
it will be executed and redirected to the reset-password page. Additionally it redirects to the home page.
2
Answers
Initialize the AppLinks object and set up the deep link handling in your main() function:
define the handleDeepLink() function and use the Navigator to navigate to the desired screens:
you can try with this dependacy go_router 9.0.3
In android AndroidManifest.xml