Attriax class
The public entry point for the Attriax mobile attribution SDK.
Create one application-level instance and initialize it during startup. Awaiting init restores persisted state, captures the immediate runtime context, and starts listeners. Network-backed work such as app-open tracking and install-referrer enrichment continues asynchronously after init completes.
final attriax = Attriax(
config: const AttriaxConfig(
projectToken: 'ax_your_project_token',
),
);
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await attriax.init();
runApp(const MyApp());
}
Constructors
- Attriax({required AttriaxConfig config})
- Creates the production SDK instance.
Properties
- consent → AttriaxConsent
-
Regulation-scoped consent helpers.
latefinal
- deepLinks → AttriaxDeepLinks
-
Deep-link state and stream access for immediate, initial, and deferred links.
latefinal
- deviceId → String?
-
Stable Attriax device identifier restored or generated during init.
no setter
- enabled ↔ bool
-
Whether the SDK is globally enabled.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- isFirstLaunch → bool
-
Whether the current installation run is the first launch observed by the SDK.
no setter
- isInitialized → bool
-
Whether init has completed successfully.
no setter
- referrer → AttriaxReferrer
-
Startup and deep-link referrer lookups.
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sdkSnapshot → AttriaxSdkSnapshot?
-
SDK version and metadata snapshot captured during initialization.
no setter
- skan → AttriaxSkan
-
SKAdNetwork state and update helpers.
latefinal
- synchronization → AttriaxSynchronization
-
Synchronization state and events.
latefinal
- tracking → AttriaxTracking
-
Tracking, revenue, and user-association helpers.
latefinal
Methods
-
dispose(
) → Future< void> - Releases listeners, closes streams, and disposes runtime resources.
-
flush(
) → Future< void> - Requests a best-effort flush of any queued events to the backend.
-
init(
) → Future< void> - Initializes the SDK runtime.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → Future< void> - Clears SDK-owned persisted state and returns this instance to pre-init state.
-
toString(
) → String -
A string representation of this object.
inherited
-
validateReceipt(
{required String receipt, bool test = false, String? provider, String? environment, String? productId, String? transactionId}) → Future< AttriaxRevenueReceiptValidationResult> - Validates a purchase receipt immediately and returns the public result.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited