sddl_sdk 0.0.9
sddl_sdk: ^0.0.9 copied to clipboard
A Flutter SDK for working with SDDL deep links and attribution.
đą SDDL SDK for Flutter #
Flutter SDK for sddl.me â simple deep links and mobile attribution.
Support for deep links with metadata, cold start handling, and easy integration.
đ Features #
- â Deep link handling (foreground and cold start)
- â
Extract link metadata (
user_id, UTM params, etc.) - â Easily navigate to screens on link open
đĻ Installation #
In your pubspec.yaml:
dependencies:
sddl_sdk: ^0.0.7
Then run:
flutter pub get
đ ī¸ Setup #
Android #
Update AndroidManifest.xml with an intent filter:
<activity ...>
<intent-filter>
<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="{YOUR_SUBDOMAIN}.sddl.me" />
</intent-filter>
</activity>
iOS #
Make sure to enable Universal Links in your Info.plist.
đ˛ Usage #
Initialize SDDL in your main.dart, after runApp():
void main() {
runApp(MyApp());
Sddl.init(onLinkReceived: (LinkData? data) {
if (data != null) {
print("đ Received deep link with slug: ${data.metaData?['user_id']}");
// Navigate to screen using navigatorKey, etc.
}
});
}
âšī¸ Make sure to set a global
navigatorKeyif you want to push screens.
đ LinkData structure #
{
"keyName": "AbCd1234",
"fallbackUrl": "https://...",
"iosUrl": "...",
"androidUrl": "...",
"metaData": {
"slug": "pizza-margherita"
},
"extraData": {
"ip": "...",
"userAgent": "...",
"createdAt": "...",
...
}
}