initialize static method
Initializes the Hackle SDK.
sdkKey
- The SDK key provided by the Hackle platform.
hackleConfig
- The Hackle configuration settings (optional).
user
- The initial user information (optional).
Implementation
static Future<void> initialize(
String sdkKey, {
HackleConfig? hackleConfig,
HackleUser? user,
}) {
_sdkKey = sdkKey;
_appMode = hackleConfig?.hackleAppMode ?? HackleAppMode.native;
return HacklePlatform.instance.initialize(
sdkKey: sdkKey,
sdkName: SDK_NAME,
sdkVersion: SDK_VERSION,
hackleConfig: hackleConfig,
user: user,
);
}