rx_shared_preferences 1.1.1 copy "rx_shared_preferences: ^1.1.1" to clipboard
rx_shared_preferences: ^1.1.1 copied to clipboard

outdated

Shared preferences with rxdart Stream observation. Reactive shared preferences for Flutter. Reactive stream wrapper around SharedPreferences. Lightweight and easy-to-use. A stream based wrapper over s [...]

example/lib/main.dart

import 'package:example/home.dart';
import 'package:example/loggers.dart';
import 'package:example/rx_prefs_provider.dart';
import 'package:flutter/material.dart';
import 'package:rx_shared_preferences/rx_shared_preferences.dart';
import 'package:shared_preferences/shared_preferences.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();

  /// Singleton instance for app
  final rxPrefs = RxSharedPreferences(
    SharedPreferences.getInstance(),
    defaultLogger,
  );
  runApp(
    RxPrefsProvider(
      rxPrefs: rxPrefs,
      child: MyApp(),
    ),
  );
}

class MyApp extends StatelessWidget {
  const MyApp({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Rx Shared Preferences example',
      theme: ThemeData.dark(),
      home: const MyHomePage(),
    );
  }
}
65
likes
0
pub points
94%
popularity

Publisher

unverified uploader

Shared preferences with rxdart Stream observation. Reactive shared preferences for Flutter. Reactive stream wrapper around SharedPreferences. Lightweight and easy-to-use. A stream based wrapper over shared_preferences, allowing reactive key-value storage. Streaming shared preferences.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, rxdart, shared_preferences

More

Packages that depend on rx_shared_preferences