control_config 1.2.0 copy "control_config: ^1.2.0" to clipboard
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(),
      ],
  );
}
0
likes
100
pub points
5%
popularity

Publisher

verified publisherbasecontrol.dev

Wrapper around shared_preferences

Documentation

API reference

License

MIT (LICENSE)

Dependencies

control_core, flutter, shared_preferences

More

Packages that depend on control_config