initialize static method

Future<void> initialize({
  1. String? appAuthorization,
  2. bool allowInternetConnection = true,
  3. AutoUpdateSettings autoUpdateSettings = const AutoUpdateSettings(),
  4. void onSdkException(
    1. SdkEvent,
    2. String
    )?,
  5. void onSdkActivationAboutToExpire(
    1. SdkActivationAboutToExpireReason reason,
    2. int remainingTimeInSeconds
    )?,
  6. int? aVar,
})

Initialize the Magic Lane Flutter SDK.

All Magic Lane SDK objects must be used only after a successful call to this function

Parameters

  • appAuthorization: Application token that enables the SDK. Required for evaluation SDKs. The map will have a watermark and some features might not work as expected without this parameter.
  • allowInternetConnection: Allow the SDK to use internet connection for map data, routing, traffic, etc. Default is true.
  • autoUpdateSettings: Auto update settings specifying what types of resources should be updated automatically.
  • onSdkException: Callback invoked when an SDK exception occurs.
  • onSdkActivationAboutToExpire: Callback invoked when the SDK activation is about to expire, with the reason and the remaining time in seconds. Raised during SDK initialization.

Implementation

static Future<void> initialize({
  String? appAuthorization,
  bool allowInternetConnection = true,
  AutoUpdateSettings autoUpdateSettings = const AutoUpdateSettings(),
  void Function(SdkEvent, String)? onSdkException,
  void Function(
    SdkActivationAboutToExpireReason reason,
    int remainingTimeInSeconds,
  )?
  onSdkActivationAboutToExpire,
  int? aVar,
}) => GemKitPlatform.instance.loadNative(
  appAuthorization: appAuthorization,
  autoUpdateSettings: autoUpdateSettings,
  allowInternetConnection: allowInternetConnection,
  onSdkException: onSdkException,
  onSdkActivationAboutToExpire: onSdkActivationAboutToExpire,
  aVar: aVar,
);