hive 1.1.0-beta3 copy "hive: ^1.1.0-beta3" to clipboard
hive: ^1.1.0-beta3 copied to clipboard

outdated

Lightweight and blazing fast key-value database written in pure Dart. Stronly encrypted using AES-256.

example/lib/main.dart

import 'dart:io';

import 'package:hive/hive.dart';

part 'main.g.dart';

@HiveType()
class Person {
  @HiveField(0)
  String name;

  @HiveField(1)
  int age;

  @HiveField(2)
  List<String> friends;

  @override
  String toString() {
    return '$name: $age';
  }
}

void main() async {
  var path = Directory.current.path;
  Hive.init(path);

  var box = await Hive.openBox('testBox');

  var person = Person()
    ..name = 'Dave'
    ..age = 22
    ..friends = ['Linda', 'Marc', 'Anne'];

  box.put('dave', person);

  print(box.get('dave')); // Dave: 22
}
5939
likes
0
pub points
100%
popularity

Publisher

verified publisherisar.dev

Lightweight and blazing fast key-value database written in pure Dart. Stronly encrypted using AES-256.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

meta, path, pointycastle

More

Packages that depend on hive