Skip to content

Instantly share code, notes, and snippets.

View maverick42's full-sized avatar

Frédérik BENOIST maverick42

  • FRANCE
View GitHub Profile
/// Use SharedPreferences in Flutter effortlessly
/// https://medium.com/@simonpham/use-sharedpreferences-in-flutter-effortlessly-835bba8f7418
// utils/shared_prefs.dart
class SharedPrefs {
late final SharedPreferences _sharedPrefs;
static final SharedPrefs _instance = SharedPrefs._internal();
factory SharedPrefs() => _instance;