Skip to content

Instantly share code, notes, and snippets.

@anilcancakir
Created January 23, 2023 22:49
Show Gist options
  • Save anilcancakir/83e51c0f1539acf26b3eb07955f527de to your computer and use it in GitHub Desktop.
Save anilcancakir/83e51c0f1539acf26b3eb07955f527de to your computer and use it in GitHub Desktop.
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