initialize static method Null safety

Future<HyperTrack> initialize(
  1. String publishableKey,
  2. {bool? requireBackgroundTrackingPermission,
  3. bool? loggingEnabled,
  4. bool? allowMockLocations,
  5. bool? automaticallyRequestPermissions}
)

Creates an SDK instance

Implementation

static Future<HyperTrack> initialize(
  String publishableKey, {
  bool? requireBackgroundTrackingPermission,
  bool? loggingEnabled,
  bool? allowMockLocations,
  bool? automaticallyRequestPermissions,
}) {
  return _invokeSdkVoidMethod(SdkMethod.initialize, {
    _keyPublishableKey: publishableKey,
    _keyRequireBackgroundTrackingPermission:
        requireBackgroundTrackingPermission ??= false,
    _keyLoggingEnabled: loggingEnabled ??= false,
    _keyAllowMockLocations: allowMockLocations ??= false,
    _keyAutomaticallyRequestPermissions: automaticallyRequestPermissions ??=
        true,
  }).then((value) => HyperTrack._());
}