Why Migrate?
Google announced the deprecation of Firebase Dynamic Links, leaving many developers searching for a replacement. Redirectly was built specifically to fill this gap, offering a similar “deferred deep linking” capability but with a focus on the Flutter ecosystem. See our full comparison: Firebase Dynamic Links Alternative.
The migration process involves three main steps:
- Setting up your project in Redirectly
- Configuring your domain and native platforms
- Replacing the Flutter SDK code
Step 1: Create Your Redirectly Project
First, sign up for a free account on the Redirectly Dashboard. Create a new project and note down your API Key. You will need this to initialize the SDK.
Step 2: Replace Dependencies
Remove the firebase_dynamic_links package from your pubspec.yaml and add flutter_redirectly.
dependencies:
- firebase_dynamic_links: ^5.4.0
+ flutter_redirectly: ^1.0.0Step 3: Initialize the SDK
In your main.dart, replace the Firebase initialization with Redirectly. For detailed implementation instructions, check out our Flutter Deferred Deep Linking guide and React Native Deferred Deep Linking guide.
// OLD: Firebase
await Firebase.initializeApp();
// NEW: Redirectly
final redirectly = FlutterRedirectly();
await redirectly.initialize(
RedirectlyConfig(
apiKey: 'YOUR_API_KEY',
enableDebugLogging: kDebugMode,
),
);Step 4: Handle Incoming Links
The API for listening to links is very similar. Redirectly provides a stream for foreground clicks and a method for initial links.
Foreground Listeners
// OLD: Firebase
FirebaseDynamicLinks.instance.onLink.listen((dynamicLinkData) {
final Uri deepLink = dynamicLinkData.link;
// Handle link
});
// NEW: Redirectly
redirectly.onLinkClick.listen((linkClick) {
final Uri deepLink = linkClick.originalUrl; // or linkClick.link.target
// Handle link
});Initial Link (App Launch)
// OLD: Firebase
final PendingDynamicLinkData? initialLink =
await FirebaseDynamicLinks.instance.getInitialLink();
// NEW: Redirectly
final LinkClick? initialLink =
await redirectly.getInitialLink();Step 5: Update AndroidManifest & Info.plist
Just like with FDL, you need to register your domain for Android App Links and iOS Universal Links.
- Android: Update your
intent-filterhost to match your Redirectly custom domain (e.g.,app.redirectly.appor your own domain). - iOS: Update your
Associated Domainsentitlement to include your new domain.
Step 6: Creating Links
If you generate links programmatically, switch to the Redirectly API:
// NEW: Redirectly
final link = await redirectly.createLink(
slug: 'promo-2024',
target: 'https://myapp.com/promo',
metadata: {
'campaign': 'spring_sale',
'source': 'instagram'
}
);
print(link.shortUrl); // https://your.domain/promo-2024Conclusion
Migrating to Redirectly gives you full control over your deep links with a modern, supported platform. If you have any questions during migration, check out our documentation or start building free deep links today.
Ready to Replace Firebase Dynamic Links?
Redirectly is the #1 Firebase Dynamic Links alternative, built specifically for Flutter developers. Get started with deferred deep linking, custom domains, and real-time analytics.
Start Free Migration