shared_prefs_manager 0.0.1 copy "shared_prefs_manager: ^0.0.1" to clipboard
shared_prefs_manager: ^0.0.1 copied to clipboard

A Dart package for easily using SharedPreferences. Provides access to the majority of SharedPreference's API.

example/example.dart

import 'package:shared_prefs_manager/shared_prefs_manager.dart';

main() async {
  initSharedPrefs();
  Set<String> allKeys = getAllKeys();
  print(allKeys);

  bool intWasSet = await setIntValue("myIntValue", 1121);
  if (intWasSet) {
    bool valKeyDoesExist = prefsContainsKey("myIntValue");
    int myIntVal = getIntValue("myIntValue");

    print(valKeyDoesExist);
    print(myIntVal);
  }
  prefsRemove("myIntValue");

  prefsClearAll();

  allKeys = getAllKeys();
  print(allKeys);
}
0
likes
150
points
18
downloads

Publisher

verified publisherlok.ninja

Weekly Downloads

A Dart package for easily using SharedPreferences. Provides access to the majority of SharedPreference's API.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, shared_preferences

More

Packages that depend on shared_prefs_manager