initPreferences method

Future initPreferences({
  1. String? appId,
  2. String? apiKey,
  3. String? customDomain,
})

Implementation

Future initPreferences(
    {String? appId, String? apiKey, String? customDomain}) async {
  if (customDomain != null) {
    _authKeys = AuthKeys(customDomain: customDomain);
    if (customDomain.startsWith('http')) {
      url = customDomain;
    } else {
      url = 'https://$customDomain';
    }
  } else {
    _authKeys = AuthKeys(appId: appId, apiKey: apiKey);
  }
}