settings property
Settings
get
settings
The settings of this instance (the defaults of Settings when instanceFor got none and nothing set them), for example to check whether its cache is persistent (Settings.persistenceEnabled, Settings.cacheSettings).
Implementation
Settings get settings => _settings;
set
settings
(Settings settings)
Changes the settings of this instance, as in FlutterFire: allowed until the instance is first used (any read, write, listener or other call that needs the client), not after.
final FirebaseFirestore firestore = FirebaseFirestore.instance;
firestore.settings = Settings(persistenceEnabled: false);
Throws a FirestoreException with FirestoreErrorCode.failedPrecondition once the instance was used (then terminate it and get a new one), and an ArgumentError or StateError for settings that are invalid, as the constructor of Settings does.
Implementation
set settings(Settings settings) {
_checkNotStarted('settings');
_settings = settings;
}