Skip to main content

reactive_shared_prefs 1.0.1+1 copy "reactive_shared_prefs: ^1.0.1+1" to clipboard
reactive_shared_prefs: ^1.0.1+1 copied to clipboard

Reactive wrapper around SharedPreferences with streams and auto updates.

Reactive Shared Preferences #

A Flutter package that provides a reactive wrapper for [SharedPreferences].
It allows you to watch keys as streams, so multiple widgets or BLoCs can react to changes automatically.

Features #

  • Supports int, double, bool, String, List<String>.
  • Streams emit current value immediately and subsequent changes.
  • Automatic updates across multiple listeners.
  • Easy to integrate with BLoC, Provider, or StreamBuilder.

Usage #

final prefs = ReactiveSharedPreferences();
await prefs.init();

// Listen for changes
prefs.watch<int>('counter').listen((value) {
  print('Counter: $value');
});

// Update value
await prefs.set<int>('counter', 1);

// Remove key
await prefs.remove('counter');

// Clear all
await prefs.clear();
1
likes
0
points
21
downloads

Publisher

unverified uploader

Weekly Downloads

Reactive wrapper around SharedPreferences with streams and auto updates.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, shared_preferences

More

Packages that depend on reactive_shared_prefs