ConfigLoader class

App-level glue that turns an on-disk TOML file into a TerminalConfig. The only component that knows the config path; a library consumer skips it and builds TerminalConfig directly. All failures fall back to defaults.

Constructors

ConfigLoader()

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

load() TerminalConfig
Resolve the default path and load it (used by main()).
loadFile(String? path) TerminalConfig
Read + parse path. Returns defaults if path is null, the file is absent, or parsing throws.
resolveConfigPath([Map<String, String>? env]) String?
$XDG_CONFIG_HOME/flutter_alacritty/flutter_alacritty.toml, else $HOME/.config/.... Null when neither env var is set.
watch(String path, {Duration debounce = const Duration(milliseconds: 150)}) Stream<TerminalConfig>
Watch path for changes and emit a freshly-parsed TerminalConfig on each change (debounced). The first event is the current file (or defaults if absent). Parse failures keep the last-good config (logged, not emitted as broken). Library hosts that build config in-memory skip this entirely.