control_config 1.2.0 control_config: ^1.2.0 copied to clipboard
Wrapper around shared_preferences
Part of [flutter_control] family #
This library is wrapper around [shared_preferences]
Mixin provider:
class UserPrefs with PrefsProvider {
String get userId => prefs.get('user_id');
set userId(String value) => prefs.set('user_id', value);
}
Instance:
final id = PrefsProvider.instance.get('user_id');
Standalone Module Initialization:
class UserPrefs with PrefsProvider {
Control.initControl(
modules: [
ConfigModule(),
],
);
}