jsettings

Last updated:

0 purchases

jsettings Image
jsettings Images
Add to Cart

Description:

jsettings

jsettings.dart #




A simple JSON key-value store for Dart.
Similar to shared_preferences on
Linux and Windows but uses a filesystem watcher to provide change notifications.
import 'package:jsettings/jsettings.dart';
copied to clipboard
final settings = JSettings('/path/to/settings.json');
await settings.init();

print('Keys: ${settings.getKeys()}');

if (settings.hasKey('key')) {
print(settings.getValue('key'));
}

settings.added.listen((key) => print('Added: $key'));
settings.changed.listen((key) => print('Changed: $key'));
settings.removed.listen((key) => print('Removed: $key'))

await settings.setValue('key', 'value');
await settings.resetValue('key');

await settings.close();
copied to clipboard

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.