Configuration class
Implements static functions for files and directories in the sync variant.
- Inheritance
-
- Object
- BaseConfiguration
- Configuration
Constructors
- Configuration(String directory, String? filePrefix, BaseLogger logger)
-
Constructor: reads the configuration file.
directory
: the configuration file will be searched herefilePrefix
: the filename without extension. The extension will be found automatically - Configuration.fromFile(String _filename, BaseLogger logger)
- Constructor with a given filename.
Properties
- filename → String
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
no setterinherited
- isNotEmpty → bool
-
no setterinherited
- logger ↔ BaseLogger
-
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- yamlMap ↔ Map
-
getter/setter pairinherited
Methods
-
asBool(
String key, {String? section}) → bool -
Returns a bool value given by
section
andkey
.key
: the key of the (key value) pairsection
: if given the (key value) pair is searched in this sectioninherited -
asFloat(
String key, {String? section, double? defaultValue}) → double? -
Returns a float value given by
section
andkey
.key
: the key of the (key value) pairsection
: if given the (key value) pair is searched in this sectiondefaultValue
: if the key does not exists this value is returnedinherited -
asInt(
String key, {String? section, int? defaultValue}) → int? -
Returns an int value given by
section
andkey
.key
: the key of the (key value) pairsection
: if given the (key value) pair is searched in this sectiondefaultValue
: if the key does not exists this value is returnedinherited -
asString(
String key, {String? section, String? defaultValue}) → String? -
Returns a string value given by
section
andkey
.key
: the key of the (key value) pairsection
: if given the (key value) pair is searched in this sectiondefaultValue
: if the key does not exists this value is returnedinherited -
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