control_config 1.1.0 copy "control_config: ^1.1.0" to clipboard
control_config: ^1.1.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
points
250
downloads

Publisher

verified publisherbasecontrol.dev

Weekly Downloads

Wrapper around shared_preferences

License

unknown (license)

Dependencies

control_core, flutter, shared_preferences

More

Packages that depend on control_config