Creative & DesignIntermediate
flutter-working-with-databases
Build a structured data layer using SQLite
Developer Setup
Setup & Installation
bash
npx skills add https://github.com/flutter/skills --skill flutter-working-with-databasesnpx skills add https://github.com/flutter/skills --skill flutter-working-with-databasesOr paste this URL into your assistant to install:
Overview
What This Skill Does
Build a structured data layer using SQLite
Application
When to use this Skill
- Integrating flutter working with databases into your development workflow.
- Following best practices for build a structured data layer using sqlite.
- Automating repetitive tasks with AI-assisted tooling.
- Building production-grade applications with proper standards.
- Debugging and troubleshooting common implementation issues.
Documentation
Show Skills.md file
Architecting the Data Layer
Contents
- Core Architecture
- Services Implementation
- Repository Implementation
- Caching Strategies
- Workflows
- Examples
Core Architecture
Construct the data layer as the Single Source of Truth (SSOT) for all application data. In an MVVM architecture, the data layer represents the Model. Never update application data outside of this layer.
Separate the data layer into two distinct components: Repositories and Services.
Repositories
- Act as the SSOT for a specific domain entity.
- Contain business logic for data mutation, polling, caching, and offline synchronization.
- Transform raw data models (API/DB models) into Domain Models (clean data classes containing only what the UI needs).
- Inject Services as private members to prevent the UI layer from bypassing the repository.
Services
- Act as stateless wrappers around external data sources (HTTP clients, SQLite databases, platform plugins).
- Perform no business logic or data transformation beyond basic JSON serialization.
Lines 1 - 25 of 192
Recommendations
Explore other random skills
CreativeBeginner
figma-create-design-system-rules
Generate project-specific design system rules for Figma-to-code workflows
CreativeBeginner
figma-create-new-file
Create a new blank Figma Design or FigJam file
CreativeIntermediate
figma-generate-design
Build or update screens in Figma from code or description using design system components