support Click to see our new support page.
support For sales enquiry!

How to Implement Deep Linking in Flutter (Complete Guide)

How to Implement Deep Linking in Flutter Banner

Nishma KVJuly 13, 2026

Imagine a user receives a promotional email containing a link to a specific product in your Flutter application. Instead of opening the app's home screen and requiring the user to search for the product manually, the link takes them directly to the product page. This seamless navigation is made possible through Flutter Deep Linking Implementation.

Deep linking has become an essential feature for modern mobile applications because it creates a smoother user experience and supports marketing campaigns, push notifications, QR codes, and user engagement strategies. Whether you're building an eCommerce platform, a food delivery application, or a banking solution, deep links help users reach the exact content they need with minimal effort.

In this guide, you'll learn how Flutter deep linking works, explore the different types of deep links, configure Android and iOS, implement deep linking using the latest Flutter packages, test your implementation, troubleshoot common issues, and follow best practices for production-ready applications.

 


What is Flutter Deep Linking?

Flutter Deep Linking is a mechanism that allows users to open a specific screen within a Flutter application using a URL instead of launching the app's default home screen. These links can originate from websites, emails, push notifications, QR codes, or other mobile applications.

For example:

myapp://products/123

Or

https://example.com/products/123

 

When a user taps one of these links, the application opens directly to the product details page instead of the home page.

Why is Deep Linking Important?

Deep linking improves navigation by directing users to the exact content they want without unnecessary steps. This results in:

  • Faster access to app content
  • Improved user experience
  • Higher engagement rates
  • Better conversion rates
  • Simplified navigation
  • More effective marketing campaigns

 


How Flutter Deep Linking Works

Understanding the flow behind deep linking makes implementation much easier.

The process typically follows these steps:

  1. A user taps a deep link.
  2. Android or iOS verifies that your app can handle the link.
  3. The operating system launches your Flutter application.
  4. Flutter receives the incoming URL.
  5. Your routing system navigates to the appropriate screen.

For example, if a customer clicks:

https://shop.example.com/product/25

 

the app may automatically display Product #25 without requiring any additional navigation.

 


Types of Deep Links

Flutter supports several types of deep links, each designed for different scenarios.

 

Type

Description

Best Use Case

Standard Deep Links

Opens the app if already installed

Internal app navigation

Deferred Deep Links

Redirects users after installation

App install campaigns

Android App Links

Verified HTTPS links for Android

Production Android apps

iOS Universal Links

Verified HTTPS links for iOS

Production iOS apps

 

Standard Deep Links

These use custom URL schemes such as:

myapp://profile

While simple to implement, custom schemes are not verified, meaning another app could potentially register the same scheme.

Android App Links

Android App Links use verified HTTPS URLs that are associated with your application's domain.

Example:

https://example.com/profile

Android verifies your ownership of the domain before opening the application, making this method more secure.

iOS Universal Links

Universal Links provide similar functionality for iOS devices. Apple verifies the relationship between your app and your website using an Apple App Site Association (AASA) file.

 


Benefits of Flutter Deep Linking

Implementing deep linking provides advantages for both developers and end users.

  • Better User Experience

Users reach the exact content they expect instead of navigating through multiple screens.

  • Improved Marketing Campaigns

Deep links make email campaigns, advertisements, and social media promotions more effective by directing users to relevant content.

  • Higher User Engagement

Reducing the number of navigation steps encourages users to complete actions such as purchases, registrations, or bookings.

  • Simplified Push Notifications

Notifications can take users directly to a specific offer, message, or transaction.

  • QR Code Integration

Businesses can generate QR codes that open product pages, promotional offers, or event registrations directly inside the application.

 


Prerequisites

Before implementing Flutter Deep Linking, ensure you have:

  • Flutter SDK installed
  • Android Studio
  • Xcode (for iOS development)
  • A physical Android or iOS device for testing
  • Basic knowledge of Flutter routing
  • A verified domain (recommended for App Links and Universal Links)

 


Choosing the Right Flutter Package

Several Flutter packages support deep linking. Choosing the right one depends on your application's architecture.

 

Package

Best For

Advantages

app_links

Modern Flutter apps

Active maintenance and easy implementation

go_router

Navigation and routing

Official Flutter routing package with built-in deep linking

uni_links

Legacy projects

Suitable for older applica-

tions but less recommended for new projects

 

For most new Flutter applications, combining go_router with app_links provides a clean, scalable, and maintainable solution.

 


How to Implement Deep Linking in Flutter

Step 1: Create a Flutter Project

If you don't already have a project, create one using the Flutter CLI:

flutter create flutter_deep_link_demo

Navigate to the project directory:

cd flutter_deep_link_demo

 


Step 2: Install Required Packages

For most modern Flutter applications, the recommended combination is:

  • go_router – Manages app navigation and routing.
  • app_links – Detects and handles incoming deep links.

Add these packages to your pubspec.yaml file:

dependencies:

 flutter:

   sdk: flutter

 

 go_router: ^14.2.0

 app_links: ^6.0.2

Then install the dependencies:

flutter pub get

Tip: Always check the latest package versions on pub.dev before implementing them in your project.

 


Step 3: Configure Android

Android requires your application to declare which URLs it can handle.

Open:

android/app/src/main/AndroidManifest.xml

Inside the <activity> tag, add an intent filter:

<intent-filter android:autoVerify="true">

 

   <action android:name="android.intent.action.VIEW"/>

 

   <category android:name="android.intent.category.DEFAULT"/>

 

   <category android:name="android.intent.category.BROWSABLE"/>

 

   <data

       android:scheme="https"

       android:host="example.com"/>

 

</intent-filter>

Understanding the Configuration

Let's break down each part:

android:autoVerify="true"

Requests Android to verify that your application owns the specified website.

VIEW

Allows Android to launch your application when a supported URL is opened.

BROWSABLE

Enables the application to receive links from browsers, emails, messaging apps, QR code scanners, and other external sources.

host

Specifies the domain that your application should respond to.

For example:

https://example.com/products/15

will launch your Flutter application.

 


Step 4: Configure Digital Asset Links

For Android App Links to work correctly, your website must host a file named:

assetlinks.json

Location:

https://example.com/.well-known/assetlinks.json

A simplified example looks like this:

[

 {

   "relation": [

     "delegate_permission/common.handle_all_urls"

   ],

   "target": {

     "namespace": "android_app",

     "package_name": "com.example.app",

     "sha256_cert_fingerprints": [

       "YOUR_SHA256_CERTIFICATE"

     ]

   }

 }

]

This file proves to Android that your website is associated with your application.

Note: Without a valid assetlinks.json file, verified App Links may not work even if your AndroidManifest configuration is correct.

 


Step 5: Configure iOS

iOS uses Universal Links, which require additional configuration.

Open your project in Xcode.

Navigate to:

Signing & Capabilities

Add the Associated Domains capability.

Then add:

applinks:example.com

This tells iOS that your application can handle links from your domain.

 


Step 6: Configure the Apple App Site Association (AASA) File

Your website also needs an Apple App Site Association file.

Location:

https://example.com/.well-known/apple-app-site-association

Example:

{

 "applinks": {

   "details": [

     {

       "appIDs": [

         "ABCDE12345.com.example.app"

       ],

       "paths": [

         "*"

       ]

     }

   ]

 }

}

Apple uses this file to verify that your domain is linked to your iOS application.

 


Step 7: Configure Routing with go_router

Now it's time to define your application's routes.

final router = GoRouter(

 routes: [

   GoRoute(

     path: '/',

     builder: (context, state) => const HomePage(),

   ),

   GoRoute(

     path: '/product/:id',

     builder: (context, state) {

       final id = state.pathParameters['id']!;

       return ProductPage(productId: id);

     },

   ),

 ],

);

How This Works

This configuration tells Flutter:

  • / opens the home screen.
  • /product/:id opens a specific product page.
  • The product ID is extracted directly from the URL.

For example:

https://example.com/product/25

automatically opens:

ProductPage(productId: "25")

This makes it easy to create dynamic routes for products, blogs, user profiles, events, and more.

 


Step 8: Handle Incoming Links with app_links

After configuring routing, listen for incoming deep links.

final appLinks = AppLinks();

 

appLinks.uriLinkStream.listen((Uri uri) {

 print(uri);

 

 // Navigate based on the URI

});

Whenever a user opens a supported link, the stream emits the corresponding Uri, allowing your application to respond appropriately.

For example:

https://example.com/product/100

can be parsed to extract the product ID and navigate to the appropriate screen.

 


Step 9: Navigate to the Correct Screen

Once the URI is received, use go_router to navigate.

appLinks.uriLinkStream.listen((Uri uri) {

 router.go(uri.path);

});

This ensures that users are taken directly to the correct page based on the URL.

 


Step 10: Handle Cold Starts

Sometimes users open the application from a deep link while the app is completely closed.

Retrieve the initial link when the application launches:

final initialUri = await appLinks.getInitialLink();

 

if (initialUri != null) {

 router.go(initialUri.path);

}

This ensures that deep links work whether the app is:

  • Closed
  • Running in the background
  • Already open

Handling all three states is essential for a reliable user experience.

 


Example Deep Link Flow

Consider the following URL:

https://example.com/product/42

The navigation flow is:

  1. User taps the link.
  2. Android or iOS verifies the domain.
  3. The operating system launches the Flutter app.
  4. app_links receives the URI.
  5. go_router extracts /product/42.
  6. Flutter navigates directly to the Product Details page.

The user reaches the desired content without manually browsing through the app.

 


Best Practices During Implementation

While implementing deep linking, keep these recommendations in mind:

  • Use HTTPS-based App Links and Universal Links instead of custom URL schemes for production apps.
  • Keep your route structure simple and predictable.
  • Validate all incoming URL parameters before using them.
  • Handle invalid or unsupported links gracefully.
  • Avoid exposing sensitive information in URLs.
  • Test deep links on both Android and iOS using real devices, as simulators may not accurately reflect all behaviors.

 


Testing, Troubleshooting, and Best Practices

After implementing deep linking in your Flutter application, the next step is to verify that everything works as expected. Thorough testing helps ensure users can access the intended content regardless of whether the app is installed, running in the background, or completely closed. This section covers testing methods, common issues, best practices, and real-world use cases to help you build a reliable deep linking experience.

 


Testing Flutter Deep Links

Testing is a crucial step before deploying your application. Verify that deep links behave correctly across different devices, operating systems, and app states.

Testing on Android

You can test Android App Links using Android Debug Bridge (ADB).

Run the following command from your terminal:

adb shell am start \

-a android.intent.action.VIEW \

-c android.intent.category.BROWSABLE \

-d "https://example.com/product/25"

If the configuration is correct, the application should launch and navigate directly to the Product Details page.

Verify the Following

  • The application opens successfully.
  • The correct screen is displayed.
  • URL parameters are parsed correctly.
  • Navigation works when the app is closed.
  • Navigation works when the app is already running.
  • Invalid URLs are handled gracefully.

 


Testing on iOS

For iOS, Universal Links should be tested on a physical device, as simulators may not always replicate their behavior accurately.

Test your implementation by:

  • Opening a Universal Link from Safari.
  • Tapping a link in the Mail app.
  • Opening links from supported messaging applications.
  • Scanning a QR code linked to your website.

Confirm that the application opens directly to the intended screen without displaying errors.

 


Testing Different App States

A complete deep linking implementation should work in all application states.

 

App State

App State

App Closed

Opens the app and navigates to the target page

App Running

Navigates directly to the requested screen

App in Background

Brings the app to the foreground and opens the target page

 

Testing each scenario helps ensure a consistent user experience.

 


Common Issues and Troubleshooting

Even with the correct implementation, you may encounter configuration or routing issues. The following table highlights some common problems and their possible solutions.

 

App State

Possible Cause

Recommended Solution

App doesn't open

Incorrect Intent Filter or Associated Domains

Verify AndroidManifest.xml and Xcode configuration

Opens the home screen instead of the target page

Route configuration issue

Check your go_router routes and URI parsing

Universal Links open in Safari

Missing or invalid AASA file

Verify the Apple App Site Association file

Android App Links open in the browser

Invalid assetlinks.json

Confirm the Digital Asset Links file is accessible and correctly configured

Invalid route errors

Incorrect URL structure

Validate incoming URLs before navigation

Parameters are missing

URI parsing issue

Ensure route parameters match your URL structure

 

Tip: Most deep linking issues are caused by incorrect platform configuration rather than Flutter code. Always verify your Android and iOS settings before debugging the application logic.

 


Best Practices for Flutter Deep Linking

Following best practices helps improve security, maintainability, and user experience.

  • Prefer HTTPS-based App Links and Universal Links over custom URL schemes.
  • Keep your URL structure simple and meaningful.
  • Validate all incoming parameters before using them.
  • Handle unsupported or invalid links gracefully.
  • Use named routes for easier maintenance.
  • Avoid exposing sensitive information in URLs.
  • Redirect users to an appropriate screen if the requested content is unavailable.
  • Test deep links on real devices before release.
  • Keep routing logic centralized to simplify debugging.
  • Log deep link events during development to identify navigation issues.
  • Regularly test your implementation after Flutter or package updates.
  • Use analytics to measure the performance of deep links in marketing campaigns.

 


Security Considerations

Deep links often receive data from external sources, making security an important aspect of implementation.

Consider the following recommendations:

  • Validate every incoming URL before processing it.
  • Verify user authentication before opening protected screens.
  • Avoid placing confidential information in URL parameters.
  • Restrict access to sensitive pages when users are not logged in.
  • Sanitize dynamic parameters before using them in database queries or API requests.

Implementing these safeguards helps protect your application from malicious or unexpected input.

 


Performance Tips

Deep linking should improve the user experience, not slow it down.

To maintain good performance:

  • Keep route initialization lightweight.
  • Avoid unnecessary API calls during app launch.
  • Load only the required screen when a deep link is received.
  • Cache frequently accessed data when appropriate.
  • Optimize navigation to minimize loading delays.

A fast and responsive application encourages users to continue their journey after opening a deep link.

 


Real-World Use Cases

Deep linking is widely used across various industries to improve navigation and engagement.

 

Industry

Example Use Case

E-commerce

Open a specific product or promotional offer

Banking

Direct users to transaction history or payment screens

Food Delivery

Open restaurant menus or active orders

Healthcare

Access appointment details or medical reports

Travel

Display booking confirmations or itinerary information

Event Management

Open event registration or ticket details

Social Media

Navigate directly to user profiles or shared posts

SaaS Applications

Access dashboards, reports, or shared workspaces

These use cases demonstrate how deep linking enhances both user experience and business outcomes.

 


Frequently Asked Questions

1. What is the difference between Deep Links and Universal Links?

Deep Links use custom URL schemes, while Universal Links (iOS) and App Links (Android) use verified HTTPS URLs associated with your application's domain. Universal Links and App Links provide better security and a smoother user experience.

2. Which Flutter package is recommended for deep linking?

For most modern Flutter applications, using go_router for navigation together with app_links for handling incoming URLs is a reliable and maintainable approach.

3. Can deep links work if the application is not installed?

Standard deep links require the application to be installed. Deferred deep links can redirect users to the app store first and continue the intended navigation after installation.

4. Is deep linking supported on both Android and iOS?

Yes. Android supports App Links, while iOS uses Universal Links. Flutter allows you to implement both using platform-specific configuration and appropriate packages.

5. Why are my deep links opening in the browser instead of the app?

This usually indicates an issue with your platform configuration, such as an incorrect Intent Filter, missing assetlinks.json, or an invalid Apple App Site Association file.

 


Conclusion

Flutter deep linking is an essential feature for creating intuitive and user-friendly mobile applications. By directing users to specific screens through URLs, deep linking simplifies navigation, improves engagement, and supports marketing initiatives such as email campaigns, push notifications, and QR codes.

In this guide, we've covered the complete Flutter Deep Linking Implementation process—from understanding how deep links work and configuring Android and iOS to implementing routing with go_router, handling incoming links using app_links, testing your setup, troubleshooting common issues, and following industry best practices.

Whether you're developing an e-commerce platform, a banking solution, or a SaaS application, implementing deep linking correctly can significantly improve the overall user experience. By adopting secure configurations, validating incoming URLs, and thoroughly testing your implementation, you can build a scalable and production-ready Flutter application that delivers seamless navigation across both Android and iOS platforms.

 

0

Leave a Comment