Skip to content
pubscout

hivez

1.2.2, released a year ago by jozz.biz

Clean, type-safe wrapper for Hive databases with auto-initialization and fast queries.

$ flutter pub add hivez
Source repository

What it does

Hivez wraps the hive_ce engine to provide a unified API, automatic initialization without manual openBox calls, and built-in options like IndexedBox for ultra-fast full-text searches. It supports regular, lazy, and isolated boxes with zero-migration upgrades from regular Hive.

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

Use it when

  • You want a cleaner, type-safe API over Hive databases without manual initialization boilerplate.
  • You need fast text queries or full-text search capabilities using IndexedBox.
  • You require a unified API that lets you seamlessly switch between regular, lazy, and isolated boxes.

Skip it when

  • Your project strictly requires standard SQL features and relational querying via SQLite/Drift.
  • You are not using Hive and prefer a completely different key-value store like SharedPreferences.

Strengths

  • Zero setup with auto-initialization on first use.
  • Type-safe API eliminating dynamic casting.
  • Unified interface across different box types (regular, lazy, isolated, indexed).
  • IndexedBox provides dramatic search performance improvements over standard Hive.

Weaknesses

  • Relies on hive_ce and its adapter code generation setup for custom objects.
  • Using isolated boxes requires proper understanding of Dart isolate management.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
Yes (build_runner)
Direct dependencies
5

Requires adding hivez_flutter and configuring hive_ce adapters using build_runner.

final box = Box<int, String>('notes');
await box.put(1, 'Hello');
final note = await box.get(1);

Alternatives

Packages that do the same job and could replace hivez.

  • drift

    If you need a robust, type-safe relational SQL database instead of a NoSQL key-value store.

  • shared_preferences

    If you only need to store simple key-value configuration flags and want minimal setup.

  • flutter_secure_storage

    If you specifically need encrypted, secure hardware-backed storage for sensitive data like tokens.

Works with

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