ConfigReader class final
Typed access to a YAML mapping, with errors that name the file, the position, and the key path.
Constructors
-
ConfigReader(YamlMap map, {required String file, List<
String> path = const []})
Properties
- file → String
-
The file name used in messages, relative to the working directory when
possible.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- map → YamlMap
-
final
-
path
→ List<
String> -
Key path from the document root to map.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
warnings
→ List<
ConfigWarning> -
final
Methods
-
adoptWarnings(
ConfigReader child) → void -
Merges warnings from
childreaders into this one. -
boolean(
String key) → bool? -
checkKeys(
Iterable< String> allowed, {Iterable<String> ? suggestions}) → void -
Rejects keys outside
allowed, suggesting the closest key fromsuggestions, which defaults toallowed. -
child(
String key) → ConfigReader? -
error(
String message, {Object? key}) → ConfigException -
has(
String key) → bool -
integer(
String key, {int min = 1}) → int? -
keyPath(
String key) → String -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requiredString(
String key) → String -
string(
String key) → String? -
stringList(
String key) → List< String> ? -
stringMap(
String key) → Map< String, String> ? - A mapping of text keys to scalar values, converted to text.
-
toString(
) → String -
A string representation of this object.
inherited
-
valueError(
String key, String message) → ConfigException -
warn(
String message, {Object? key}) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited