control_config 1.0.0 copy "control_config: ^1.0.0" to clipboard
control_config: ^1.0.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
0
pub points
4%
popularity

Publisher

verified publisherbasecontrol.dev

Wrapper around shared_preferences

License

unknown (LICENSE)

Dependencies

control_core, flutter, shared_preferences

More

Packages that depend on control_config