Flutter db
Skill Poorgramer-Zack/dart-expert-skills/skills/archived/flutter-db
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.From its SKILL.md
npx -y skills add Poorgramer-Zack/dart-expert-skills --skill flutter-dbAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 7 stars7 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.7 KB, 507 tokens by cl100k_base, as published. Nobody here has run it
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.
- Shared Preferences Guide - Non-sensitive settings and flags using static wrappers.
- Secure Storage Guide - Encrypted storage for tokens and passwords.
Phase 2: High-Performance Object Storage (NoSQL)
For local-first apps requiring fast read/write of large datasets without complex relations.
- Hive CE (Synchronous NoSQL) - Blazing fast object store for local caching and offline data.
Phase 3: Complex Relational Schemas (SQL)
For apps requiring strict data integrity, transactions, and complex queries.
- Drift (Reactive SQL) - Type-safe relational database built on top of SQLite.
๐ Documentation Library
Refer to these specialized resources to implement your chosen persistence strategy:
- ๐๏ธ Database Architecture Overview
- โ๏ธ Shared Preferences
- ๐ Secure Storage (Encrypted)
- ๐ Hive CE Best Practices
- ๐ Drift (SQL) Best Practices
Constraints
- Type Safety: Prohibit raw
dynamicdata access. Always use generated classes (Drift) or typed static wrappers (SharedPreferences/SecureStorage). - Sensitivity Awareness: Force use of
Secure Storagefor 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.
What ships with it: 5 files
22.6 KB alongside SKILL.md
references/
- databases-overview.md2.9 KB
- drift.md6.6 KB
- hive-ce.md6.2 KB
- secure-storage.md3.8 KB
- shared-preferences.md3.1 KB