Home Uncategorized

Flutter SDK

Last updated on Apr 27, 2026

Flutter SDK reference

Use this alongside the Flutter setup tutorial. The plugin exports both a shared singleton (LinkMe.shared) and an optional LinkMeClient class.

Installation

flutter pub add flutter_linkme_sdk

Current release: flutter_linkme_sdk 0.2.9 (bridges LinkMeKit 0.2.9 and the Android SDK 0.2.9).

Payload type

LinkMePayload mirrors the other SDKs:

  • String? linkId
  • String? path
  • Map<String, String>? params
  • Map<String, String>? utm
  • Map<String, String>? custom
  • String? url
  • bool? isLinkMe (true for LinkMe-resolved links, false for basic universal link fallbacks)

Singleton API (LinkMe.shared)

configure(LinkMeConfig config)

Initializes the SDK.

Config field Type Default Description
appId String? App identifier from the portal.
appKey String? Optional read-only key.
sendDeviceInfo bool true Include device metadata.
includeVendorId bool true Include vendor identifier.
includeAdvertisingId bool false Enable only after consent.
debug bool false When true, native Android/iOS logs show install referrer + clipboard flow details.

Future<LinkMePayload?> getInitialLink()

Returns the payload that launched the app.

Stream<LinkMePayload> get onLink

Stream of payloads delivered while the app is running.

Future<LinkMePayload?> claimDeferredIfAvailable()

Matches first installs to prior clicks (pasteboard on iOS, Install Referrer on Android).

Future<void> track(String event, {Map<String, dynamic>? properties})

Sends analytics events.

Future<void> setAdvertisingConsent(bool granted)

Signals whether you can include Ad IDs.

Future<void> setUserId(String? userId)

Associates a user identifier with future events.

Future<void> setReady()

Signals readiness to process queued links. Call after consent dialogs or other setup.

Future<int?> debugVisitUrl(String url, {Map<String, String>? headers})

Debug helper for testing link resolution against the edge server.

Optional client API

import 'package:flutter_linkme_sdk/flutter_linkme_sdk.dart';

final linkme = LinkMeClient();
await linkme.configure(const LinkMeConfig(appId: 'app_123'));
final payload = await linkme.getInitialLink();
final sub = linkme.onLink.listen((payload) => routeUser(payload));
sub.cancel();

Use the instance API if you prefer dependency injection or test-friendly patterns.