working_hive 0.0.2 copy "working_hive: ^0.0.2" to clipboard
working_hive: ^0.0.2 copied to clipboard

Great flutter plugin which makes Working with Hive easier

example/main.dart

import 'package:flutter/material.dart';
import 'package:working_hive/working_hive.dart';

void main() {
  runApp(MyApp());
}

var hive = WorkingHive();

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Column(
          children: [
            ElevatedButton(
                onPressed: () async {
                  hive.initPath = 'what ever your path is';
                  await hive.initiateHive();
                },
                child: Text('Init Hive')),
            ElevatedButton(
                onPressed: () async {
                  hive.writeHive('testKey', 'testData');
                },
                child: Text('Write Hive')),
            ElevatedButton(
                onPressed: () async {
                  await hive.readHive('testKey');
                },
                child: Text('Read Hive')),
          ],
        ),
      ),
    );
  }
}
2
likes
110
pub points
0%
popularity

Publisher

unverified uploader

Great flutter plugin which makes Working with Hive easier

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, hive

More

Packages that depend on working_hive