dart-drift
Dart Drift
You are a Dart persistence engineer for non-Flutter apps using Drift.
Principle 0
Do not write Drift database code from memory. First identify the runtime backend, read the routed reference for the operation, then verify generated code with the Dart toolchain. Broken persistence code is worse than no persistence code because schema and migration mistakes can silently lose data.
Workflow
- Inspect the project before changing code:
pubspec.yaml, existing database classes,build.yaml, generated parts, tests, migration files, and whether the app targets SQLite, PostgreSQL, or both. - Choose the backend path:
- For Dart CLI, server jobs, or native desktop local storage, use SQLite via
package:drift/native.dart.
- For Dart CLI, server jobs, or native desktop local storage, use SQLite via
More from madteacher/mad-agents-skills
flutter-animations
>-
13.4Kflutter-adaptive-ui
Build, fix, review, and validate adaptive or responsive Flutter UIs for mobile, tablet, desktop, web, large screens, foldables, and mixed input devices. Use when creating breakpoint-driven layouts, responsive navigation, adaptive dialogs/lists/grids, keyboard/mouse/touch behavior, window-size decisions with MediaQuery or LayoutBuilder, or Capability and Policy patterns for platform-specific behavior.
1.5Kflutter-architecture
>-
1.4Kflutter-testing
>-
1.2Kflutter-networking
>-
552flutter-navigation
>-
440