BaseConfiguration class Null safety

Implements read access to a YAML based configuration content. Only a two levels structure is allowed: simple types in the first level or simple types in a named map. The name of such a map is called "section".

Implementers

Constructors

BaseConfiguration(Map yamlMap, BaseLogger logger)
Constructor: reads the configuration file. yamlMap contains the data.

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
isEmpty bool
read-only
isNotEmpty bool
read-only
logger BaseLogger
@protected, read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
yamlMap Map
@protected, read / write

Methods

asBool(String key, {String? section}) bool
Returns a bool value given by section and key. key: the key of the (key value) pair section: if given the (key value) pair is searched in this section
asFloat(String key, {String? section, double? defaultValue}) double?
Returns a float value given by section and key. key: the key of the (key value) pair section: if given the (key value) pair is searched in this section defaultValue: if the key does not exists this value is returned
asInt(String key, {String? section, int? defaultValue}) int?
Returns an int value given by section and key. key: the key of the (key value) pair section: if given the (key value) pair is searched in this section defaultValue: if the key does not exists this value is returned
asString(String key, {String? section, String? defaultValue}) String?
Returns a string value given by section and key. key: the key of the (key value) pair section: if given the (key value) pair is searched in this section defaultValue: if the key does not exists this value is returned
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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