Created
January 23, 2023 22:49
-
-
Save anilcancakir/83e51c0f1539acf26b3eb07955f527de to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Config { | |
/// All of the configuration items. | |
final Map<String, dynamic> _items = <String, dynamic>{}; | |
/// Get the specified configuration value. | |
dynamic get(String key) { | |
return _items[key]; | |
} | |
/// Set a given configuration value. | |
void set(String key, dynamic value) { | |
_items[key] = value; | |
} | |
/// Determine if the given configuration value exists. | |
bool has(String key) { | |
return _items.containsKey(key); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment