ConfigurationManager class

ConfigurationManager is a mutable configuration object. It is both an ConfigurationBuilder and an ConfigurationRoot. As sources are added, it updates its current view of configuration.

Implemented types
Available extensions

Constructors

ConfigurationManager.new()
Creates an empty mutable configuration object that is both an ConfigurationBuilder and an ConfigurationRoot.

Properties

hashCode int
The hash code for this object.
no setterinherited
properties Map<String, dynamic>
Gets a key/value collection that can be used to share data between the ConfigurationBuilder and the registered ConfigurationSources.
no setteroverride
providers Iterable<ConfigurationProvider>
The ConfigurationProviders for this configuration.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sources List<ConfigurationSource>
Gets the sources used to obtain configuration values.
no setteroverride

Methods

add(ConfigurationSource source) ConfigurationBuilder
Adds a new configuration source.
override
addCommandLine(Iterable<String> args, [LinkedHashMap<String, String>? switchMappings]) ConfigurationBuilder

Available on ConfigurationBuilder, provided by the CommandLineConfigurationExtensions extension

Adds a CommandLineConfigurationProvider ConfigurationProvider that reads configuration values from the command line.
addConfiguration(Configuration config, [bool shouldDisposeConfiguration = false]) ConfigurationBuilder

Available on ConfigurationBuilder, provided by the ChainedBuilderExtensions extension

Adds an existing configuration to ConfigurationBuilder.
addEnvironmentVariables([String? prefix]) ConfigurationBuilder

Available on ConfigurationBuilder, provided by the EnvironmentVariablesExtensions extension

addInMemoryCollection([Iterable<MapEntry<String, String>>? initialData]) ConfigurationBuilder

Available on ConfigurationBuilder, provided by the MemoryConfigurationBuilderExtensions extension

Adds the memory configuration provider to configurationBuilder.
addJson(String input) ConfigurationBuilder

Available on ConfigurationBuilder, provided by the JsonConfigurationExtensions extension

asIterable({bool makePathsRelative = false}) Iterable<MapEntry<String, String>>

Available on Configuration, provided by the ConfigurationExtensions extension

Get the enumeration of key value pairs within the Configuration
build() ConfigurationRoot
Builds a Configuration with keys and values from the set of sources registered in Sources.
override
dispose() → void
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
override
getChildren() Iterable<ConfigurationSection>
Gets the immediate children sub-sections.
override
getChildrenImplementation(String? path) Iterable<ConfigurationSection>

Available on ConfigurationRoot, provided by the InternalConfigurationRootExtensions extension

Gets the immediate children sub-sections of configuration root based on key.
getConnectionString(String name) String?

Available on Configuration, provided by the ConfigurationExtensions extension

Gets the connection string
getDebugView() String

Available on ConfigurationRoot, provided by the ConfigurationRootExtensions extension

getReloadToken() ChangeToken
Returns a ChangeToken that can be used to observe when this configuration is reloaded.
override
getRequiredSection(String key) ConfigurationSection

Available on Configuration, provided by the ConfigurationExtensions extension

Gets a configuration sub-section with the specified key.
getSection(String key) ConfigurationSection
Gets a configuration sub-section with the specified key.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reload() → void
Force the configuration values to be reloaded from the underlying ConfigurationProviders.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String key) String?
Gets the value corresponding to a configuration key.
override
operator []=(String key, String? value) → void
Sets the value corresponding to a configuration key.
override