ConfigService<T> class abstract

Inheritance

Constructors

ConfigService()

Properties

core LittleFishCore
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
kInstance ↔ T?
getter/setter pair
kIsReady bool
getter/setter pair
logger LoggerService
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
settings ConfigSettings
getter/setter pair

Methods

decryptValue(String value, {bool failOnInvalid = true}) String
Decrypts a config value produced by encryptValue (or encrypted at rest in env files). Values MUST carry the ENC: prefix: any non-empty value without it throws a FormatException — plaintext values are not supported. An empty value is returned unchanged.
encryptValue(String value) String
Encrypts a config value with AES-256-GCM using the config key embedded in the abstraction layer. Returns ENC: + base64 of nonce(12) + ciphertext + gcmTag(16); a fresh random nonce is generated on every call. An empty value is returned unchanged.
getBoolValue({required String key, String category = '', bool defaultValue = false}) bool
getDoubleValue({required String key, String category = '', double defaultValue = -1}) double
getIntValue({required String key, String category = '', int defaultValue = -1}) int
getObjectValue({required String key, String category = '', Map<String, String> defaultValue = const {}}) → dynamic
getSetting(String key) → dynamic
getStringValue({required String key, String category = '', String defaultValue = ''}) String
hasSetting(String key) bool
initialise({required ConfigSettings settings}) Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setIsReady({required bool isReady}) Future<void>
toString() String
A string representation of this object.
inherited

Operators

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