Search packages, repositories and app categories

Package detailsv1.8.1

cached_annotation

Annotations for the Cached code-generator. This package does nothing without Cached.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
5.1K
Likes
23
Pub points
140

Install package

flutter pub add cached_annotation

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The cached_annotation package provides annotations used by the Cached code generator to enable efficient, type-safe caching in Flutter applications. It works in conjunction with the Cached package and does not function independently. These annotations allow developers to mark classes and fields for automatic serialization, deserialization, and caching logic generation at compile time. This reduces boilerplate and improves performance by generating optimized cache handling code. The package supports all major platforms including Android, iOS, Web, macOS, Windows, and Linux.

Use cases

  • Generating cached models from JSON
  • Automating serialization/deserialization
  • Optimizing data persistence
  • Reducing manual boilerplate
  • Enabling type-safe cache operations
  • Improving app performance

Key features

  • Compile-time code generation
  • Type-safe caching
  • Minimal runtime overhead
  • Platform-agnostic
  • Seamless integration with Cached
  • Supports complex nested structures

Suitable for

  • Flutter apps requiring persistent data
  • Developers using Cached for state management
  • Projects aiming to reduce boilerplate
  • Teams prioritizing performance
  • Apps with frequent data fetching
  • Large-scale applications with complex models

Considerations

  • Requires Cached package to be installed
  • Code generation requires build_runner
  • Not usable standalone
  • May increase build time
  • Limited to supported data types
  • Dependent on annotation processing

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package

No data available yet.