flutter_jsettings 0.1.0 copy "flutter_jsettings: ^0.1.0" to clipboard
flutter_jsettings: ^0.1.0 copied to clipboard

JSON settings

flutter_jsettings #

pub license: MPL CI codecov

A simple JSON key-value store for Flutter.

Similar to shared_preferences on Linux and Windows but uses a filesystem watcher to provide change notifications.

import 'package:flutter_jsettings/flutter_jsettings.dart';
ChangeNotifierProvider(
  create: (_) => JSettingsNotifier('/path/to/settings.json'),
  child: MyApp(),
)
Checkbox(
  value: context.watch<JSettingsNotifier>().getBool('key') ?? false,
  onChanged: (v) => context.read<JSettingsNotifier>().setValue('key', v),
),