LinkForty class
The entry point for the LinkForty SDK.
Use LinkForty.instance to access SDK features like event tracking, link creation, and attribution data.
Example initialization:
final config = LinkFortyConfig(
baseURL: Uri.parse('https://go.yourdomain.com'),
apiKey: 'your-api-key',
);
final response = await LinkForty.initialize(config: config);
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- queuedEventCount → int
-
Returns the number of events currently waiting in the offline queue.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearData(
) → Future< void> - Permanently removes all SDK-related data from local storage.
-
clearEventQueue(
) → void - Discards all events currently in the offline queue without sending them.
-
createLink(
CreateLinkOptions options) → Future< CreateLinkResult> -
Creates a new short link programmatically based on the provided
options. -
flushEvents(
) → Future< void> - Manually triggers a flush of all queued events to the server.
-
getInstallData(
) → DeepLinkData? - Returns the DeepLinkData associated with the initial install attribution.
-
getInstallId(
) → String? -
Returns the unique
installIdassigned to this device by the backend. -
handleDeepLink(
Uri uri) → Future< void> -
Processes a deep link
urimanually. -
isFirstLaunch(
) → bool - Returns whether this app session is considered a first launch.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDeepLink(
DeepLinkCallback callback) → void -
Sets a
callbackto be invoked when a direct deep link is opened. -
onDeferredDeepLink(
DeferredDeepLinkCallback callback) → void -
Sets a
callbackto be invoked when a deferred deep link is resolved. -
reset(
) → void - Resets the SDK singleton to an uninitialized state.
-
toString(
) → String -
A string representation of this object.
inherited
-
trackEvent(
String name, [Map< String, dynamic> ? properties]) → Future<void> -
Tracks a custom in-app event with the given
name. -
trackRevenue(
{required double amount, required String currency, Map< String, dynamic> ? properties}) → Future<void> - Tracks a revenue-generating event.
-
trackScreenView(
String name, [Map< String, dynamic> ? properties]) → Future<void> - Tracks a screen view for per-link screen-flow funnels.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
Static Methods
-
initialize(
{required LinkFortyConfig config, int attributionWindowHours = 168, String? deviceId, NetworkManagerProtocol? networkManager, StorageManagerProtocol? storageManager, FingerprintCollectorProtocol? fingerprintCollector}) → Future< InstallResponse> -
Initializes the LinkForty SDK with the provided
config.