hive_multiisolate 1.2.1 copy "hive_multiisolate: ^1.2.1" to clipboard
hive_multiisolate: ^1.2.1 copied to clipboard

A class allowing the user of Hive across isolates. It opens the box, execute the operation and closes it immediately.

example/main.dart

import 'package:hive_multiisolate/hive_multiisolate.dart';

void main() async {
  var myBox = HiveMultiIsolateBox<String>('boxName', isMultiIsolate: true);

  // Just use the box as you would a normal Hive box, except it's async for all operations.
  await myBox.put('key', 'value');
  print(await myBox.get('key'));

  // You can have sync boxes by leaving isMultiIsolate as false.
  var syncBox = HiveMultiIsolateBox<String>('syncBox');
  await syncBox.open();
  await syncBox.put('key', 'value');
  print(syncBox.getSync('key'));
}
4
likes
0
points
92
downloads

Publisher

unverified uploader

Weekly Downloads

A class allowing the user of Hive across isolates. It opens the box, execute the operation and closes it immediately.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

hive

More

Packages that depend on hive_multiisolate