settings property
Get the current Settings
for this FirebaseFirestorePlatform
instance.
Implementation
@override
Settings get settings {
return const Settings();
}
Specifies custom settings to be used to configure this FirebaseFirestorePlatform
instance.
You must set these before invoking any other methods on this FirebaseFirestorePlatform
instance.
Implementation
@override
set settings(Settings settings) {
// Union type MemoryLocalCache | PersistentLocalCache
dynamic localCache;
final persistenceEnabled = settings.persistenceEnabled;
if (persistenceEnabled == null || persistenceEnabled == false) {
localCache = firestore_interop.memoryLocalCache(null);
} else {
localCache = firestore_interop
.persistentLocalCache(firestore_interop.PersistentCacheSettings(
cacheSizeBytes: settings.cacheSizeBytes?.toJS,
));
}
if (settings.host != null && settings.sslEnabled != null) {
_settings = firestore_interop.FirestoreSettings(
localCache: localCache,
host: settings.host?.toJS,
ssl: settings.sslEnabled?.toJS,
ignoreUndefinedProperties: settings.ignoreUndefinedProperties.toJS,
);
} else {
_settings = firestore_interop.FirestoreSettings(
localCache: localCache,
ignoreUndefinedProperties: settings.ignoreUndefinedProperties.toJS,
);
}
}