cached_annotation
1.8.1, released a year ago by iteo.com
Provides annotations for the Cached code‑generator to define caching behavior.
What it does
The package supplies a set of annotations that the Cached generator uses to create caching logic, including persistent storage and update mechanisms. It does not contain runtime code; it only works together with the cached package.
AI-written summary of version 1.8.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are using the cached package and want compile‑time generated caching logic
- You need annotations for persistent, lazy, or updateable cache behavior
Skip it when
- You are not using the cached package or prefer manual caching implementations
Strengths
- Lightweight annotation‑only library
- Rich set of cache‑related annotations (persistent, lazy, update, delete, etc.)
- Works seamlessly with the cached code‑generator
Weaknesses
- Useless without the cached package
- No runtime functionality on its own
- Limited to annotation use‑cases
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Add the dependency and run build_runner together with the cached package; no native permissions required
Alternatives
Packages that do the same job and could replace cached_annotation.
- freezed_annotation
Annotations for the freezed code-generator.
78Compare - theme_tailor_annotation
Annotations for Theme Tailor code generator, no runtime logic.
78Compare - freezed
Code generation for immutable classes, tagged unions, and cloning without boilerplate.
96Compare - auto_mappr_annotation
Annotations for the auto_mappr code-generator to map between objects.
79Compare
Works with
Packages commonly used together with cached_annotation: ones it builds on, ones built on it, and its own family.