askill
tech-flutter

tech-flutterSafety 90Repository

Flutter development patterns and best practices for AI-assisted development.

0 stars
1.2k downloads
Updated 2/21/2026

Package Files

Loading files...
SKILL.md

Flutter Development Patterns

Tech-stack skill for Flutter mobile application development. Covers clean architecture, coding standards, state management, and code review checks.

Supporting Files

FilePurpose
architecture-patterns.mdClean architecture layers, Riverpod state management, screen wrappers, router patterns
coding-standards.mdNaming conventions, const constructors, early returns, function guidelines
review-checks.mdFlutter-specific code review checklist

Architecture Overview

Flutter apps following this workflow use clean architecture with four layers:

LayerDirectoryResponsibility
UIlib/screens/, lib/components/Screens and reusable widgets
Business Logiclib/services/, lib/providers/Services and state management
Datalib/data/models/Data structures and repositories
Utilitieslib/utils/, lib/theme/Helpers, theming, logging

State Management

  • Primary: Riverpod (flutter_riverpod) for reactive state
  • UI State: Freezed for immutable state classes
  • Legacy: Provider (maintain but do not add new usage)
  • Hooks: Flutter Hooks for widget-level state

Key Principles

  1. Reuse before create -- check existing components before building new ones
  2. Flat widget trees -- break deep nesting into smaller components
  3. Const constructors -- reduce unnecessary rebuilds
  4. Type safety -- always declare types, avoid dynamic
  5. Short functions -- under 20 lines, single purpose
  6. Early returns -- avoid deep nesting with guard clauses
  7. No magic numbers -- define constants
  8. Compile after every change -- ensure each iteration builds

Navigation Patterns

  • Main screens: Drawer + bottom navigation bar
  • Detail screens: Back button + bottom navigation bar
  • Screen wrapper: Use a BaseScreen widget for consistent layout
  • Route definitions: Centralized in a router file using generateRoute()

Common Tasks

TaskApproach
Add a screenWrap in BaseScreen, register route, add to navigation
Add a serviceCreate in services directory, follow singleton pattern, use Logger
Add localizationEdit ARB files, run flutter gen-l10n, access via AppLocalizations.of(context)!
Add a formUse shared form components, 12px field spacing, consistent validation
Add a providerUse Riverpod, prefer autoDispose, use select() for granular rebuilds

Before Committing

  1. Run flutter analyze (fail on errors)
  2. Verify code compiles
  3. Update relevant documentation
  4. Follow naming conventions (PascalCase classes, camelCase methods, snake_case files)

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

72/100Analyzed 2/24/2026

Well-structured Flutter tech-stack skill with clear architecture patterns, coding principles, and tables. Covers clean architecture, Riverpod state management, and navigation patterns with good organizational clarity. Lacks step-by-step tutorials and references external supporting files not included in the content. Tags are mismatched (github-actions, observability not Flutter-specific). Solid reference skill but could be more actionable with specific command examples.

90
80
75
60
65

Metadata

Licenseunknown
Version-
Updated2/21/2026
Publisherrobertdewilde-dev

Tags

github-actionsobservability