AppConfig class
High-level facade for application configuration.
Loads .json files from disk on creation, provides dot-notation access,
in-memory overrides, and reload capability.
Usage:
final config = await AppConfig.create();
print(config.get('app.name'));
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 current configuration.
-
get(
String key, [dynamic defaultValue]) → dynamic -
Retrieves a config value at
key. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reload(
{bool keepOverrides = false}) → Future< void> - Reloads configuration from disk.
-
set(
String key, dynamic value) → void -
Sets a configuration
valueatkeyin memory. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited