Deep linking for FlutterFlow apps
FlutterFlow empowers developers to build beautiful Flutter apps without writing code. Redirectly extends that no-code philosophy to deferred deep linking and install attribution. Generate Redirectly links directly from FlutterFlow custom actions, and handle deep link events in navigation flows—all without touching native code.
No-code advantages
- Pure visual building: All deep linking configuration in FlutterFlow UI
- Custom actions: Call Redirectly API to create and manage links
- Navigation automation: Route users based on deep link parameters
- Real-time analytics: Track attribution in Redirectly dashboard
Typical flow
- 1Create custom action in FlutterFlow to generate Redirectly link
- 2Share the link through social, email, or messaging
- 3User clicks link and installs your app if needed
- 4FlutterFlow navigation handles the deep link automatically
Create custom actions for Redirectly
In FlutterFlow, custom actions let you call external APIs. Create a custom action to generate Redirectly links without leaving your app builder.
Step 1: Create API call custom action
In FlutterFlow, go to Custom Functions → Create new custom action. Set up an HTTP POST request to Redirectly API:
POST /link/create
Headers:
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
Body:
{
"path": "promo/summer2024",
"query": "campaign=social&source=instagram",
"subdomain": "myapp",
"description": "Summer promo campaign link"
}
Response:
{
"link": "https://myapp.redirectly.app/promo/summer2024?campaign=social&source=instagram",
"id": "link_abc123",
"created_at": "2024-03-07T10:30:00Z"
}
Step 2: Store the generated link
After calling the Redirectly API, store the returned link in a local variable or global app state so you can share it:
// In your custom action:
Future<String> generateRedirectlyLink({
required String path,
required String? query,
}) async {
final response = await makeApiCall(
url: 'https://api.redirectly.app/link/create',
apiKey: 'your_api_key',
body: {
'path': path,
'query': query,
'subdomain': 'myapp',
},
);
if (response.statusCode == 200) {
final json = jsonDecode(response.body);
return json['link'] as String;
}
throw Exception('Failed to create link');
}
// Return the generated link
return generatedLink;
Handle deep links in navigation
Configure your FlutterFlow app to listen for deep links and route users to the correct page based on the deep link path.
Step 1: Enable deep linking in FlutterFlow
In Project Settings → App Settings, enable Deep Linking. Add your custom domain:
- iOS: myapp.redirectly.app
- Android: myapp.redirectly.app
- Web: myapp.redirectly.app (optional)
Step 2: Create page routes for deep links
In FlutterFlow page routing, define deep link routes that map paths to pages. For example:
Routes:
/home → HomePage
/promo/:campaignId → PromoScreen
- Route parameter: campaignId
/product/:productId → ProductDetailScreen
- Route parameter: productId
/user/:userId → UserProfileScreen
- Route parameter: userId
// Query parameters (from the 'query' field)
?campaign=social&source=instagram → Available in page context
Step 3: Access parameters in FlutterFlow pages
Once a deep link navigates to a page, access the parameters and use them to customize the page content:
Route parameters:
widget.parameters['campaignId']
Query parameters:
GoRouter.of(context).queryParameters['campaign']
Real-world use cases
Marketing campaigns
Generate unique Redirectly links for each campaign, embedded in social media, email, or ads. Track which campaigns drive the most installs.
Referral programs
Create referral links with the referrer ID as a parameter. When the referred user installs and launches, reward the referrer automatically.
Product sharing
Users can generate shareable links for specific products or content. Friends click the link, install your app, and see the exact product they were interested in.
Email verification
Include Redirectly deep links in verification emails. Users click the link, install the app, and are automatically taken to complete their signup.
Re-engagement campaigns
Send deep links to inactive users that open the app directly to relevant new features or content, driving re-engagement without manual navigation.
Next steps
Add deferred deep linking to your FlutterFlow app today: