flutter_lightweight_store

Last updated:

0 purchases

flutter_lightweight_store Image
flutter_lightweight_store Images
Add to Cart

Description:

flutter lightweight store

flutter_lightweight_store #

A light weight key-value store (SharedPreferences & NSUserdefaults) with saving to separated/customizable xml/plist.
Usage #
Please run example/lib/main.dart for more demonstrations
/// Mark this instance as static, then you can access it across the app
/// 💚 We will save the key-value data to a file named `com.your.name.xml` on Android or `com.your.name.plist` on iOS
FlutterLightweightStoreModule sp = FlutterLightweightStoreModule("com.your.name");

/// setter
await sp.setString("String", "Hello world");
await sp.setInt("Int", 10086);
await sp.setDouble("Double", 10086.12306);
await sp.setBoolean("Boolean", true);

/// getter
var str = await sp.getString("String");
var int = await sp.getInt("Int");
var double = await sp.getDouble("Double");
var boolean = await sp.getBoolean("Boolean");

print('✅[SP] setter & getter: string -> $str, int -> $int, double -> $double, boolean -> $boolean');

/// remove
await sp.removeKey('StringKey');

/// contains
bool isContains = await sp.contains('StringKey');
copied to clipboard
Features and bugs #
Please feel free to: request new features and bugs at the issue tracker

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.