InvergeDocs
FlutterAPI reference

Deep links

Deep links in the Flutter SDK.

import 'package:nexus_flutter/nexus.dart';
SymbolKindSummary
NexusDeepLinkSourceenumWhere a NexusDeepLink came from.
NexusDeepLinkclassA Nexus link that brought the user into the app, as the server resolved it.
NexusLinksclassDeep linking & attribution (OneLink-style), automatic with linksEnabled:

NexusDeepLinkSource

enum
enum NexusDeepLinkSource

Where a NexusDeepLink came from.

ValueDescription
NexusDeepLinkSource.installThe first launch after an install, matched to the link that led to it (deferred deep link).
NexusDeepLinkSource.openThe app was opened by a Nexus link while already installed.
View source class

A Nexus link that brought the user into the app, as the server resolved it.

View source constructor
const NexusDeepLink({required this.source, this.uri, this.path, this.params = const {}, this.slug, this.campaign, this.mediaSource, this.channel, this.clickId, this.matchType})

Parameters

Prop

Type

View source

isDeferred

property
bool get isDeferred
View source

source

field
final NexusDeepLinkSource source
View source

uri

field
final Uri? uri

The URL that opened the app. Null for a deferred match after an install.

View source

path

field
final String? path

Where to take the user: the link's deep-link value (console), else the path of the URL that opened the app.

View source

params

field
final Map<String, dynamic> params

The link's deep-link parameters (console → link → deep-link params).

View source

slug

field
final String? slug
View source

campaign

field
final String? campaign
View source

mediaSource

field
final String? mediaSource
View source

channel

field
final String? channel
View source

clickId

field
final String? clickId
View source

matchType

field
final String? matchType

deterministic, probabilistic or organic.

View source class

Deep linking & attribution (OneLink-style), automatic with linksEnabled:

  • Install — reported once per install on first launch, matched to the link click exactly via the Google Play install referrer on Android, or by the opening link itself, else by the server's fingerprint window.
  • Open — every launch or resume from a Nexus link is reported, matched exactly by its click-id.
  • Routing — when the app's router could not have seen the link (deferred deep link after install; app opened by the short link itself via App Links / Universal Links), the SDK routes to the link's deep-link value by delivering it as a platform deep link — any Router or Navigator handles it.

Uninstalls are measured server-side (silent push probes); nothing runs here.

View source property
Stream<NexusDeepLink> get onLink

Every Nexus deep link as it is resolved (install or open).

View source

consumePending()

method
NexusDeepLink? consumePending()

The last deep link the SDK did NOT route itself (routing off, or the onDeepLink handler took over), cleared on read — e.g. route it from your home screen once the user has logged in.

Returns NexusDeepLink?

View source

start()

method
Future<void> start()

Wire automatic install/open reporting. Called by Nexus.init when linksEnabled; idempotent.

View source

attribute()

method
Future<Map<String, dynamic>?> attribute({String type = 'install', String? clickId, String? slug, String? name, String? platform, Map<String, Object?>? properties})

Report a conversion. Pass clickId (from the link) for deterministic attribution, or slug when the app was opened by the short link itself; otherwise the server matches by fingerprint. Returns the matched link's deep-link data (or null if unattributed).

Parameters

Prop

Type

Returns Future<Map<String, dynamic>?>

View source method
Future<Map<String, dynamic>?> handleDeepLink(Uri uri, {String type = 'open'})

Convenience: parse a deep-link uri for link_click_id and attribute an open, returning the deep-link data. Not needed with linksEnabled, which reports opens automatically.

Parameters

Prop

Type

Returns Future<Map<String, dynamic>?>

View source

dispose()

method
void dispose()
View source

On this page