hive_ce_generator
1.12.1, released 3 weeks ago by iodesignteam.com
Automatically generates TypeAdapters for Hive to store custom classes.
What it does
Automatically generates TypeAdapters for Hive to store any class. It provides schema migration and generates a HiveRegistrar extension to register all generated TypeAdapters in one call.
AI-written summary of version 1.12.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are using hive_ce for local storage and need to store custom Dart classes
- You want automated TypeAdapter generation instead of writing them manually
Skip it when
- You are not using hive_ce
- You prefer runtime reflection or manual adapter writing without code generation
Strengths
- Automates TypeAdapter generation for custom classes
- Supports generator annotations like GenerateAdapters and schema migration
Weaknesses
- Requires running a code generator setup
- Documentation points externally to hive_ce
Setup
- Kind
- Pure Dart
- Effort
- Medium
- Code generation
- Yes (build_runner)
- Direct dependencies
- 10
Requires setting up build_runner to run code generation for Hive adapters.
not documentedAlternatives
Packages that do the same job and could replace hive_ce_generator.
- hydrated_bloc
Automatically persists and restores bloc and cubit states.
85Compare - hive_flutter
Flutter extension for Hive providing easy initialization and adapters for common types.
50Compare - hive_local_storage
A wrapper around hive_ce for easy local data storage and encryption.
70Compare - ffcache
File-based key-value store with automatic cache expiration in temporary folders.
54Compare
Works with
Packages commonly used together with hive_ce_generator: ones it builds on, ones built on it, and its own family.
- analyzerhive_ce_generator depends on itPerforms static analysis of Dart code for tool integration and embedding.
- yamlhive_ce_generator depends on itA Dart library for parsing YAML documents into Dart data structures.
- globhive_ce_generator depends on itA file and directory globbing library that supports Bash-style path matching and listing.
- buildhive_ce_generator depends on itPackage for authoring build_runner compatible code generators.
- source_genhive_ce_generator depends on itSource code generation builders and utilities for the Dart build system.
- hive_cehive_ce_generator depends on itA lightweight and fast NoSQL key-value database written in pure Dart.
- yaml_writerhive_ce_generator depends on itA library to write YAML documents supporting Object encoding and dart:convert Converter.
- build_runnerUsed togetherA build system for Dart code generation and modular compilation.