config_manager library
A JSON-based configuration manager for Dart applications.
Provides path-based access to nested configuration values (via
List<String> key paths), singleton-based access, and a mixin for
convenient class integration.
Classes
- ConfigManagerBase
- Base implementation of IConfigManager, backed by an in-memory, sector-keyed configuration store.
- ConfigManagerSingleton
- Singleton that loads and provides access to JSON configuration, organized by sector.
- IConfigBase
- Common contract shared by configuration consumers and managers.
- IConfigExtension
- Interface for classes that can load and retrieve configuration values.
- IConfigManager
- Interface for a sector-based configuration manager.
Mixins
- ConfigExtension
- Mixin that provides configuration access by delegating to ConfigManagerSingleton.
Constants
- kDefaultSector → const String
- The sector used when none is explicitly provided.
Functions
-
deepMergeMaps(
Map< String, dynamic> base, Map<String, dynamic> ? overrides) → Map<String, dynamic> -
Deep-merges
overridesonto a copy ofbase; neither argument is mutated. -
lookupPath(
Map< String, dynamic> map, List<String> path) → dynamic -
Walks
mapfollowingpath, returning the value found at the end of it, ornullas soon as a segment is missing or the current node isn't a map.
Exceptions / Errors
- ConfigFileNotFoundException
- ConfigTypeMismatchException
- Thrown by ConfigManagerBase.set when overwriting an existing key with a value whose runtime type differs from the one currently stored.