ConfigRepository class

A thread-safe, in-memory configuration store with dot-notation key access.

Supports nested configuration via key.nested.value, deep copying, and safe key validation to prevent path traversal attacks.

Example:

config.set('database.host', 'localhost');
config.get('database.host'); // -> 'localhost'

Constructors

ConfigRepository([Map<String, dynamic> items = const {}])
Creates a new repository with optional initial items.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

all() Map<String, dynamic>
Returns a deep copy of the entire configuration map.
get(String key, [dynamic defaultValue]) → dynamic
Retrieves a value at key using dot-notation.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset(Map<String, dynamic> items) → void
Replaces all current config with a deep copy of items.
set(String key, dynamic value) → void
Sets a value at the given dot-notation key.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited