import 'package:configurable/configuration_provider.dart'; /// Mutable Configuration Provider /// /// @author sombochea /// @since 1.0.3 abstract class MutableConfigurationProvider extends ConfigurationProvider { /// Allow to set the value into config values void set(String key, String? value); /// Allow to set all values into config values void setAll(Map configs) { configs.forEach((key, value) { set(key, value); }); } /// Allow to remove the key from config values void remove(String key); /// Allow to remove all values from config values void removeAll(); /// Allow to set the value into config values in async function Future setAsync(String key, String? value) async { set(key, value); } /// Allow to set all values into config values in async function Future setAllAsync(Map configs) async { configs.forEach((key, value) { setAsync(key, value); }); } /// Allow to remove the key from config values in async function Future removeAsync(String key) async { remove(key); } /// Allow to remove all values from config values in async function Future removeAllAsync() async { removeAll(); } }