Skip to content

Poorgramer-Zack/dart-expert-skills / skills/archived/flutter-db

flutter-db

Verified

Local database and persistence selection for Flutter including SharedPreferences, SecureStorage, Hive, and Drift. Use when implementing offline storage, encrypted data persistence, or choosing between key-value and relational local databases.

Database Architecture Guide (Flutter)

Goal

Implement robust, scalable, and secure local persistence strategies for Flutter applications. This skill ensures developers choose the optimal storage engine—balancing simple key-value settings, encrypted sensitive data, high-performance NoSQL object stores, and complex relational databases.

Process

🚀 High-Level Workflow

Selecting the right persistence layer depends on data sensitivity, complexity, and relationship depth.

Phase 1: Key-Value Persistence (Simple & Secure)

Use lightweight stores for settings and sensitive credentials.

Phase 2: High-Performance Object Storage (NoSQL)

For local-first apps requiring fast read/write of large datasets without complex relations.

Phase 3: Complex Relational Schemas (SQL)

For apps requiring strict data integrity, transactions, and complex queries.


📚 Documentation Library

Refer to these specialized resources to implement your chosen persistence strategy:

Constraints

  • Type Safety: Prohibit raw dynamic data access. Always use generated classes (Drift) or typed static wrappers (SharedPreferences/SecureStorage).
  • Sensitivity Awareness: Force use of Secure Storage for any tokens, passwords, or PII. Never store sensitive data in SharedPreferences or unencrypted Hive boxes.
  • Singleton Access: Access storage instances via DI (Riverpod) or strictly defined static classes to prevent key fragmentation.
  • Performance Balance: Use NoSQL (Hive) for high-frequency reads and SQL (Drift) for complex relationships. Don't over-engineer simple apps with SQL.
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall