floor_annotation
1.5.0, released 3 years ago by pinch.nl
Typesafe SQLite annotations for the Floor ORM.
WASM-readyQuiet but busy
What it does
Provides annotations that generate type‑safe, reactive SQLite code for Flutter. It is a low‑level part of the Floor library and should be used via the main floor package.
AI-written summary of version 1.5.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a lightweight, reactive SQLite solution with compile‑time safety.
- You prefer code generation over manual SQL strings.
- You are already using the floor package for database access.
Skip it when
- You want a pure runtime ORM like drift or sqflite without code generation.
- You need advanced features such as migrations or complex queries beyond what Floor offers.
Strengths
- Compile‑time type safety
- Reactive streams for query results
- Lightweight and minimal runtime footprint
Weaknesses
- Must be used together with the floor package
- Requires build_runner for code generation
- Limited to SQLite only
Setup
- Kind
- Pure Dart
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 1
Add floor_annotation to dev_dependencies, run `flutter pub run build_runner build` after importing floor in your project.
Alternatives
Packages that do the same job and could replace floor_annotation.
- drift
Offers a richer feature set and advanced migrations
99Compare - sqflite_common
Simple SQLite wrapper without code generation
93Compare
Works with
Packages commonly used together with floor_annotation: ones it builds on, ones built on it, and its own family.