You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On August 25th, 2025, Firebase Dynamic Links will be shut down. Read more about the [**announcement here**](https://firebase.google.com/support/dynamic-links-faq). It's recommended to start exploring alternative solutions like [**Branch.io**](#dynamic-links-with-branchio) for link management and deep linking.
13
+
On August 25th, 2025, Firebase Dynamic Links will be shut down. Read more about the [**announcement here**](https://firebase.google.com/support/dynamic-links-faq). It's recommended to start exploring alternative solutions like [**Branch.io**](#deep-links-with-branchio) for link management and deep linking.
14
14
:::
15
15
16
16
Adding deep and dynamic linking allows you to share a special type of link that takes the user right
@@ -34,8 +34,8 @@ requires authentication, you'll see a login page. After successful login, you ca
34
34
shared with you.
35
35
36
36
The best thing to note here is that even if the app has a different flow for accessing the page
37
-
content (e.g. Home Page -> All Posts -> Single Post), you can bypass the flow and directly open a
38
-
specific page (e.g. Single Post).
37
+
content (e.g., Home Page -> All Posts -> Single Post), you can bypass the flow and directly open a
38
+
specific page (e.g., Single Post).
39
39
40
40
## Deep Link
41
41
@@ -330,7 +330,7 @@ To share the dynamic link of the page:
330
330
331
331
1. Select the page that you would like to open via a deep link.
332
332
333
-
2. Select any widget (e.g. share button) from the widget tree or the canvas area.
333
+
2. Select any widget (e.g., share button) from the widget tree or the canvas area.
334
334
335
335
3. First, add the action
336
336
to [Generate Current Page Link](generate-current-page-link.md#defining-generate-current-page-link-action).
@@ -402,7 +402,7 @@ To pass custom data with the link, you need to have the following:
402
402
403
403
That's all you need to pass custom data with a **Deep Link** or **Dynamic Link**.
404
404
405
-
## Dynamic Links with Branch.io
405
+
## Deep Links with Branch.io
406
406
407
407
Since **Firebase Dynamic Links** have been deprecated and can no longer be used for new Firebase projects, we can integrate a powerful alternative: **[Branch.io](https://branch.io/)** — a cross-platform solution for deep linking and deferred linking.
408
408
@@ -674,3 +674,291 @@ Be sure to test both fresh installs (deferred deep links) and existing app sessi
674
674
For a complete walkthrough, check out the tutorial video:
If you’d prefer not to integrate Branch.io from scratch, we have introduced the **Branch Deep Linking Library** that you can import from the Marketplace completely free.
682
+
683
+
This library sets up everything you need for routing users into your app using Branch’s smart links — with native configuration, link handling, and deep link helpers already wired in.
684
+
685
+
### Install Library
686
+
687
+
To install the Branch Deep Linking Library, open the FlutterFlow Marketplace, search for the library, and click **+ Add for Free**.
688
+
689
+
:::tip[marketplace]
690
+
You can find the [**Library here**](https://marketplace.flutterflow.io/item/oAco1HzQHxtOVE1ssTcC).
691
+
:::
692
+
693
+
This installs the library into your FlutterFlow account, and you can reuse it across any number of projects.
Open your `main.dart` file in FlutterFlow and add the `initBranch` custom action under the **Final Actions** section. This ensures the **Branch SDK** is initialized when your app launches.
758
+
759
+
760
+
### Handle Branch Deeplink [Custom Action]
761
+
762
+
To receive and act on deep link data, go to your **Entry Page** or **Logged-In Page** and add the `handleBranchDeeplink` action as the first action in the page flow.
763
+
764
+
This `handleBranchDeeplink` action listens for incoming Branch Deeplinks and handles routing logic. This action should be added to your Entry Page or Logged-In Page under the **onPageLoad** trigger. It initializes a stream listener that waits
765
+
for Branch links to be opened (either deferred or direct).
766
+
767
+
When a link is received, the `onLinkOpened` callback is triggered with
768
+
the link data, allowing you to perform custom navigation or logic. You can perform your navigation logic in this action callback.
769
+
770
+
<div style={{
771
+
position: 'relative',
772
+
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
The `handleBranchDeeplink` action receives a `linkData` object that contains all the metadata sent with the link. The `linkData` parameter is a Map containing useful information from the Branch link:
801
+
802
+
- **`$canonical_identifier`:** The original route path used when the link was generated (e.g., `/imageDetails/:id`).
803
+
804
+
- **`~referring_link`:** The full Branch URL that was clicked.
805
+
806
+
- **`page`:** The target page or screen the link is meant to open (e.g., paywall). This is a custom parameter set by the user when generating the link.
807
+
808
+
- Any custom parameters added during link creation (e.g., `campaign`, `productId`, `referrer`, etc.)
809
+
810
+
This lets you write flexible, conditional navigation logic based on what was shared.
811
+
812
+
813
+
<div style={{
814
+
position: 'relative',
815
+
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
- Load content from Firestore using a referenced ID.
848
+
849
+
850
+
851
+
852
+
853
+
854
+
### Generate Link [Custom Action]
855
+
856
+
857
+
The `generateLink` action allows you to create a custom Branch Smart Link directly from your FlutterFlow app.
858
+
859
+
This is especially useful when you want to let users:
860
+
- Share app content (like a post, product, or image).
861
+
- Invite others with referral codes.
862
+
- Trigger deep links that take recipients to specific app screens.
863
+
864
+
The action accepts the following parameters:
865
+
866
+
- **`canonicalIdentifier`** – A unique path for the content (e.g., `/imageDetails/:id`). This becomes the key reference used when routing the user back into the app.
867
+
868
+
- **`title`** – The link's title (used in social previews or analytics).
869
+
870
+
- **`description`** – (Optional) A short description of the content.
871
+
872
+
- **`metadata`** – A dynamic map of custom parameters to include with the link
- **`linkProperties`** – A dynamic map for configuring how the link behaves
876
+
(e.g., set the `feature`, `channel`, `campaign`, or `stage` for analytics).
877
+
878
+
### Branch Helper Functions
879
+
880
+
These functions help you safely work with deep link data, extract values, and conditionally navigate based on link metadata.
881
+
882
+
- **`isTargetingPage(linkData, targetPage)`** - Checks whether the page value in the link data matches a specific screen name. The `page` parameter is set by the user when generating the link from Branch dashboard or FlutterFlow.
883
+
884
+
- **`getCanonicalIdentifierFromLink(linkData)`** - Returns the canonical path (e.g., `/imageDetails/abc123`) that was originally attached to the smart link. Useful for extracting the base route or content reference associated with the shared link.
885
+
886
+
- **`getReferringLinkFromLink(linkData)`** - Retrieves the full Branch smart link URL from the data (typically under the `~referring_link` key). Useful for tracking, analytics, or verifying the source of the link.
887
+
888
+
- **`getLastPathSegmentFromMap(linkData, key)`** - Extracts the last path segment (e.g., `abc123`) from a URI stored inside a link data field (e.g., `/imageDetails/abc123`). Useful for extracting the ID from a link.
889
+
890
+
- **`getLinkValue(linkData, key)`** - Safely retrieves any single value from the link data Map. Returns null if not found. (e.g., retrieving `showPromo` attribute value from the `linkData`).
891
+
892
+
- **`createLinkProperties(...)`** - Returns a Branch Link Properties map used when generating a smart link. You can define values like: feature, campaign, stage, channel, alias or tags or custom fallback URLs. Useful for organizing and tracking generated links for marketing or referrals.
893
+
894
+
895
+
896
+
### DreamBrush Link Generation Example
897
+
898
+
In the DreamBrush app, we can use `generateLink` after a user finishes generating an image.
899
+
The link could include:
900
+
- **page**: Current Page Route that is `/imageDetails/:imageRef`.
901
+
- **title**: "Check out my AI image!"
902
+
903
+
This link can then be shared via WhatsApp, email, or social media — and when clicked, it brings the recipient directly to that content inside the app.
904
+
905
+
Here's a quick example of generating a Branch link from a page that uses a Firebase Document ID as a route parameter.
906
+
907
+
<div style={{
908
+
position: 'relative',
909
+
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
0 commit comments