softlink_flutter 0.0.9 copy "softlink_flutter: ^0.0.9" to clipboard
softlink_flutter: ^0.0.9 copied to clipboard

SoftLink Flutter SDK for deep linking, deferred deep linking, and install attribution.

softlink_flutter #

Official Flutter SDK for SoftLink — a deep link management platform.

Features #

  • 🔗 Deep linking (when app is already installed)
  • 📦 Deferred deep linking (when app is not installed)
  • 📱 Device-level install attribution (Android ID / iOS IDFV)
  • 🎯 Snapchat CAPI integration support
  • 🔄 Automatic duplicate URI handling
  • 💾 Persistent storage via GetStorage

Installation #

dependencies:
  softlink_flutter: ^0.0.9

Usage #

Initialize the SDK in your main.dart:

import 'package:softlink_flutter/softlink_flutter.dart';

void main() {
  runApp(MyApp());
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    SoftLink.init(
      baseUrl: 'https://your-softlink-backend.com',
      apiKey: 'sl_your_api_key',
      onDeepLink: (deepLink) {
        if (deepLink == null) return;
        print('Screen: ${deepLink.screen}');
        print('Params: ${deepLink.params}');
      },
    );
  }
}

Use SoftLink.generateReferralLink() to generate shareable deep links at runtime:

// Without token (finds first dynamic link matching screenKey):
final url = await SoftLink.generateReferralLink(
  screenKey: 'PRODUCT_DETAIL',
  values: {'productId': '209', 'categoryId': '220'},
  referrerId: currentUser.id, // optional
);

// With token (targets a specific dynamic link):
final url = await SoftLink.generateReferralLink(
  screenKey: 'PRODUCT_DETAIL',
  values: {'productId': '209', 'categoryId': '220'},
  token: 'PARENT_TOKEN', // from SoftLink portal
  referrerId: currentUser.id,
);

if (url != null) {
  Share.share(url); // share via any app
}

Notes:

  • Same values always return the same link (deduplication) ✅
  • Generated link inherits expiry from parent dynamic link ✅
  • referrerId is stored as ref param for referral tracking ✅
Property Type Description
token String Unique link token
screen String Screen key (e.g. DOCTOR_PROFILE)
params Map<String, dynamic> Link parameters
linkType String static or dynamic

Android Setup #

Add to android/app/src/main/AndroidManifest.xml inside <activity>:

<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="your-domain.com" android:pathPrefix="/l/"/>
</intent-filter>
<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="yourscheme" android:host="l"/>
</intent-filter>

Add to MainActivity.kt:

override fun onNewIntent(intent: Intent) {
    super.onNewIntent(intent)
    setIntent(intent)
}

iOS Setup #

Add to Runner.entitlements:

<key>com.apple.developer.associated-domains</key>
<array>
  <string>applinks:your-domain.com</string>
</array>

Add to Info.plist:

<key>CFBundleURLTypes</key>
<array>
  <dict>
    <key>CFBundleURLSchemes</key>
    <array>
      <string>yourscheme</string>
    </array>
  </dict>
</array>

Add to AppDelegate.swift:

// Handle Universal Links when app is already running
override func application(
  _ application: UIApplication,
  continue userActivity: NSUserActivity,
  restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void
) -> Bool {
  return super.application(application, continue: userActivity, restorationHandler: restorationHandler)
}

// Handle custom scheme URLs when app is already running
override func application(
  _ app: UIApplication,
  open url: URL,
  options: [UIApplication.OpenURLOptionsKey: Any] = [:]
) -> Bool {
  return super.application(app, open: url, options: options)
}

License #

Apache

2
likes
0
points
740
downloads

Publisher

verified publishersupersoft.com.pk

Weekly Downloads

SoftLink Flutter SDK for deep linking, deferred deep linking, and install attribution.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

app_links, device_info_plus, flutter, get_storage, http

More

Packages that depend on softlink_flutter

Packages that implement softlink_flutter