jsettings 0.1.1 copy "jsettings: ^0.1.1" to clipboard
jsettings: ^0.1.1 copied to clipboard

JSON settings

jsettings.dart #

pub license: MPL CI codecov

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
3
likes
130
points
534
downloads

Publisher

verified publishercanonical.com

Weekly Downloads

2024.09.15 - 2025.03.30

JSON settings

Repository (GitHub)
View/report issues

Documentation

API reference

License

MPL-2.0 (license)

Dependencies

collection, path

More

Packages that depend on jsettings