AppConfiguration constructor
AppConfiguration(
- String appId, {
- Uri? baseUrl,
- String? baseFilePath,
- Duration defaultRequestTimeout = const Duration(seconds: 60),
- List<
int> ? metadataEncryptionKey, - MetadataPersistenceMode metadataPersistenceMode = MetadataPersistenceMode.plaintext,
- @Deprecated('Use SyncTimeoutOptions.connectTimeout') Duration maxConnectionTimeout = const Duration(minutes: 2),
- Client? httpClient,
- 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');
}
}