AppConfiguration constructor

AppConfiguration(
  1. String appId, {
  2. Uri? baseUrl,
  3. String? baseFilePath,
  4. Duration defaultRequestTimeout = const Duration(seconds: 60),
  5. List<int>? metadataEncryptionKey,
  6. MetadataPersistenceMode metadataPersistenceMode = MetadataPersistenceMode.plaintext,
  7. @Deprecated('Use SyncTimeoutOptions.connectTimeout') Duration maxConnectionTimeout = const Duration(minutes: 2),
  8. Client? httpClient,
  9. SyncTimeoutOptions syncTimeoutOptions = const SyncTimeoutOptions(),
})

Instantiates a new AppConfiguration with the specified appId.

Implementation

AppConfiguration(
  this.appId, {
  Uri? baseUrl,
  String? baseFilePath,
  this.defaultRequestTimeout = const Duration(seconds: 60),
  this.metadataEncryptionKey,
  this.metadataPersistenceMode = MetadataPersistenceMode.plaintext,
  @Deprecated('Use SyncTimeoutOptions.connectTimeout') this.maxConnectionTimeout = const Duration(minutes: 2),
  Client? httpClient,
  this.syncTimeoutOptions = const SyncTimeoutOptions(),
})  : baseUrl = baseUrl ?? Uri.parse(realmCore.getDefaultBaseUrl()),
      baseFilePath = baseFilePath ?? path.dirname(Configuration.defaultRealmPath),
      httpClient = httpClient ?? defaultClient {
  if (appId == '') {
    throw RealmException('Supplied appId must be a non-empty value');
  }
}