What problem does it solve?
This Skill guides Flutter developers to implement persistent local storage using Drift (SQLite) with type-safe queries and reactive data streams, reducing boilerplate and preventing data loss.
Core Features & Use Cases
- Type-safe database integration for Flutter apps using drift_flutter
- Reactive UI patterns with StreamBuilder and Provider/Riverpod
- Cross-platform Drift setup for mobile, web, and desktop
- Database migrations and CRUD operations with practical usage patterns
- Use Case: Build a offline-first to-do app with real-time updates and migrations
Quick Start
Add dependencies drift, drift_flutter, and path_provider to pubspec.yaml and run code generation with drift_dev and build_runner. Create a Drift database class annotated with @DriftDatabase and implement the database with driftDatabase support for mobile/web/desktop. Run: dart run build_runner build. Then import the generated code and start using drift queries in your Flutter UI.