D
NavigationAdvanced50 XP5 min read

How do you implement deep linking in Flutter?

TL;DR: Deep linking requires configuring platform schemes/domains (AndroidManifest, Info.plist), handling incoming links in the app, and using go_router or the Router API to navigate to the correct screen.

Full Answer

Types of Deep Links

  • Custom scheme links: myapp://product/42 — work but flagged as less secure by OS
  • Universal Links (iOS) / App Links (Android): https://myapp.com/product/42 — preferred; verified by platform
  • Firebase Dynamic Links: managed deep links with fallback to web (deprecated in 2025)

Implementation Steps

  • 1. Configure AndroidManifest.xml with intent-filter for App Links
  • 2. Configure Info.plist with Associated Domains for Universal Links
  • 3. Host apple-app-site-association / assetlinks.json on your domain
  • 4. go_router handles the incoming URL → matched route automatically
  • 5. Test with: adb shell am start -a android.intent.action.VIEW -d 'https://myapp.com/product/42'
🎯

go_router handles deep links automatically when your GoRoutes match the incoming URL path. The hard part is platform configuration, not the Dart code.

Code Examples

dartgo_router deep link handling
Output
Opening myapp.com/product/42 launches app directly at ProductScreen(id: '42')

Common Mistakes

  • Testing deep links in debug mode only — release builds require signed App Links
  • Not handling the case where the user is unauthenticated when a deep link arrives

Interview Tip

💡

Mention the authentication challenge: a deep link to /profile/settings when the user isn't logged in. Show how go_router's redirect handles this gracefully.

#deep-linking#universal-links#app-links#go_router#Firebase