Skip to content
pubscout

hive_flutter

1.1.0, released 5 years ago by hivedb.dev

Flutter extension for Hive providing easy initialization and adapters for common types.

Quiet but busy
$ flutter pub add hive_flutter
Source repository

What it does

Adds Flutter-specific helpers to Hive, such as Hive.initFlutter() and adapters for Color and TimeOfDay. It also exports the core Hive API for seamless use in Flutter apps.

AI-written summary of version 1.1.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a lightweight, NoSQL key‑value store in a Flutter app
  • You want to store simple objects with minimal boilerplate
  • You need platform‑agnostic storage across mobile, web, and desktop

Skip it when

  • You require relational queries or complex joins
  • You need encrypted storage out of the box

Strengths

  • Fast pure‑Dart performance
  • Works on all Flutter platforms
  • Provides ready‑made adapters for common Flutter types

Weaknesses

  • No built‑in encryption (needs extra package)
  • Limited query capabilities compared to SQL databases

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
3
import 'package:hive_flutter/hive_flutter.dart';

Future<void> main() async {
  await Hive.initFlutter();
  var box = await Hive.openBox('myBox');
  await box.put('key', 'value');
  print(box.get('key'));
}

Alternatives

Packages that do the same job and could replace hive_flutter.

Works with

Packages commonly used together with hive_flutter: ones it builds on, ones built on it, and its own family.