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

Durable append-only file storage engine for native Dart and Flutter apps.

example/preference_engine_example.dart

import 'dart:convert';
import 'dart:typed_data';

import 'package:preference_engine/preference_engine.dart';

/// Uses the in-memory backend for a deterministic test or command-line task.
Future<void> main() async {
  final backend = MemoryBackend();
  await backend.open(const MemoryLocation('example'));

  await backend.commit(
    BackendCommit([
      BackendPut(
        'settings/theme',
        Uint8List.fromList(utf8.encode('dark')),
      ),
    ]),
  );

  final value = await backend.read('settings/theme');
  print(utf8.decode(value!));
  await backend.close();
}
0
likes
150
points
151
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Durable append-only file storage engine for native Dart and Flutter apps.

Homepage

Topics

#storage #preferences #database #flutter #dart

License

unknown (license)

Dependencies

collection, meta, path, preference_protocol

More

Packages that depend on preference_engine