AppConfiguration constructor

AppConfiguration(
  1. String appId, {
  2. Uri? baseUrl,
  3. Directory? baseFilePath,
  4. Duration defaultRequestTimeout = const Duration(seconds: 60),
  5. List<int>? metadataEncryptionKey,
  6. MetadataPersistenceMode metadataPersistenceMode = MetadataPersistenceMode.plaintext,
  7. Duration maxConnectionTimeout = const Duration(minutes: 2),
  8. HttpClient? httpClient,
})

Instantiates a new AppConfiguration with the specified appId.

Implementation

AppConfiguration(
  this.appId, {
  Uri? baseUrl,
  Directory? baseFilePath,
  this.defaultRequestTimeout = const Duration(seconds: 60),
  this.metadataEncryptionKey,
  this.metadataPersistenceMode = MetadataPersistenceMode.plaintext,
  this.maxConnectionTimeout = const Duration(minutes: 2),
  HttpClient? httpClient,
})  : baseUrl = baseUrl ?? Uri.parse(realmCore.getDefaultBaseUrl()),
      baseFilePath = baseFilePath ?? Directory(_path.dirname(Configuration.defaultRealmPath)),
      httpClient = httpClient ?? _defaultClient {
  if (appId == '') {
    throw RealmException('Supplied appId must be a non-empty value');
  }
}