rx_shared_preference 1.0.3+1 copy "rx_shared_preference: ^1.0.3+1" to clipboard
rx_shared_preference: ^1.0.3+1 copied to clipboard

discontinued

This package is now named [rx_shared_preferences](https://pub.dartlang.org/packages/rx_shared_preferences). Please use new name package.

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_preference/rx_shared_preference.dart';
import 'package:shared_preferences/shared_preferences.dart';

void main() {
  /// 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 Preference example',
      theme: ThemeData.dark(),
      home: const MyHomePage(),
    );
  }
}
0
likes
30
points
26
downloads

Publisher

unverified uploader

Weekly Downloads

This package is now named [rx_shared_preferences](https://pub.dartlang.org/packages/rx_shared_preferences). Please use new name package.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, rxdart, shared_preferences

More

Packages that depend on rx_shared_preference