initialize static method

dynamic initialize({
  1. required String appId,
  2. required String apiKey,
})

Implementation

static initialize({required String appId, required String apiKey}) async {
  assert(() {
    if (apiKey.isEmpty) {
      throw Exception('x-api-Key cannot be null or empty');
    }
    if (appId.isEmpty) {
      throw Exception('app-id cannot be null or empty');
    }
    return true;
  }());
  if (_sdkInitialized) return;
  try {
    _sdkInitialized = true;
    _apiKey = apiKey;
    _appId = appId;
  } catch (e) {
    print(e);
  }
}