Notes: 23. Check the Deep Links & Remove # Symbol
Where to Go From Here?
- go_route - with flutter 3.3.0 update, flutter now officially supports the go_route package.
- Beamer and auto_route are two other packages that can be used to manage the navigation in flutter. Beamer is a package that is used to manage the navigation in flutter web. Auto_route is a package that is used to manage the navigation in flutter web and mobile.
- Flutter Official Docs for Route and navigation- https://flutter.dev/docs/development/ui/navigation.
So our app is ready and if test it now it will work as intended on iOS, Android and Web. You guys can give this app a try and check weather this App runs as intended. Now let us check some of the deepLinks that we will writing and checking with our app.
Run the application in simulator(iOS) open terminal and pass the deeplink iside the terminal
xcrum simctl openurl booted 'localhost:52063/book?id=1'
The above comment will take me directly to details book page with first book selected. This lets us come directly to part where we have to go. just change the last portion after / and this will take you to a new screen directly.
To test deepLinking in Android Open the emulator and login the app. Navigating to homescreen
~/Library/Android/sdk/platform-tools/adb shell am start -a android.intent.action.VIEW \
-c android.intent.category.BROWSABLE \
-d 'localhost:52063/book?id=1'
Now the deep link is working and can be checked on android and iOS.
Also run this app on web and you will notice that everything is working perfectly on web as well. The URl is getting is updated as it must. After changing the URL the app is alo getting navigated to the intended page. So we have finally completed this Tutorial of Navigatior 2.0