binary_map_file 1.1.5 copy "binary_map_file: ^1.1.5" to clipboard
binary_map_file: ^1.1.5 copied to clipboard

Performant key-value file based serialization. Pure Dart, secured support

BinaryMapFile #

Performant key-value store using file system in pure Dart, secured support.


Getting Started #

To get started, simply import the binary_map_file package:

import "dart:io";
import 'package:binary_map_file/binary_map_file.dart';

final file = File(path),
final binaryMapFile = BinaryMapFile(file, secured: false); 
await binaryMapFile.ensureInitialized();
// if you want a secured serialization, set the flag secured to `true`

final map = binaryMapFile.map;

Get value #

Get the bool value for key firstRun, if the key is not set or null, then reset the value in map to default value and return gotten value

final firstRun = binaryMapFile.getDefaultValue<bool>('firstRun' , true); //  
// or 
final value = binaryMapFile.getValue<bool>('firstRun'); // boolean or null

Set value #

binaryMapFile.setValue<bool>('firstRun', false);

Check containing key #

final existed = binaryMapFile.containsKey('firstRun');

Serialize #

Save the current map to file

await binaryMapFile.serialize();

Supported data types #

Support all data types which MessageCodec using the Flutter standard binary encoding.

Supported messages are acyclic values of these forms:

License #

This library is licensed under the MIT License. Feel free to use it and contribute to its development.


Made with ❤️ by Annotium

0
likes
150
pub points
41%
popularity

Publisher

unverified uploader

Performant key-value file based serialization. Pure Dart, secured support

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

crypto, flutter

More

Packages that depend on binary_map_file