diff --git a/CHANGELOG.md b/CHANGELOG.md index a91f55b..819bdc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,3 +19,7 @@ ## 1.0.4 - Fixed format classes and files + +## 1.0.5 +- Fixed simple provider for final configs variable +- Fixed setAll function that set itself, in simple provider \ No newline at end of file diff --git a/lib/simple_configuration_provider.dart b/lib/simple_configuration_provider.dart index 9c6fd69..ece2346 100644 --- a/lib/simple_configuration_provider.dart +++ b/lib/simple_configuration_provider.dart @@ -5,15 +5,15 @@ import 'package:configurable/mutable_configurable_provider.dart'; /// @author sombochea /// @since 1.0.0 class SimpleConfigurationProvider implements MutableConfigurationProvider { - Map configs = {}; + final Map _configs = {}; @override String? getOrNull(String key, {String? defaultValue}) { - var value = configs[key]; + var value = _configs[key]; /// if value is null, then set the default value and return it back if (value == null) { - configs[key] = defaultValue; + _configs[key] = defaultValue; return defaultValue; } @@ -22,26 +22,26 @@ class SimpleConfigurationProvider implements MutableConfigurationProvider { @override bool containsKey(String key) { - return configs.containsKey(key); + return _configs.containsKey(key); } @override void set(String key, String? value) { - configs[key] = value; + _configs[key] = value; } @override void remove(String key) { - configs.remove(key); + _configs.remove(key); } @override void removeAll() { - configs.clear(); + _configs.clear(); } @override void setAll(Map configs) { - configs.addAll(configs); + _configs.addAll(configs); } } diff --git a/pubspec.yaml b/pubspec.yaml index d193608..0279224 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: configurable description: System Configuration and Dotenv Environment for Dart and Flutter -version: 1.0.4 +version: 1.0.5 homepage: https://github.com/CUBETIQ/system-config-dart repository: https://github.com/CUBETIQ/system-config-dart.git