flutter-patterns

Provide Flutter 3.x and Dart 3 patterns for widget architecture, Riverpod state management, and GoRouter navigation.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/ps-carvalho/spavn-agents --skill flutter-patterns-ps-carvalho
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: flutter-patterns
Source: https://github.com/ps-carvalho/spavn-agents/tree/main/.opencode/skills/flutter-patterns
Command: npx skills add https://github.com/ps-carvalho/spavn-agents --skill flutter-patterns-ps-carvalho

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides best practices and patterns for building production-ready Flutter applications using modern Dart 3 features, state management, and cross-platform deployment strategies.

Core Features & Use Cases

  • Widget Architecture: Guidance on structuring UI with StatelessWidget and StatefulWidget.
  • Dart 3 Features: Demonstrates sealed classes and pattern matching for cleaner code.
  • State Management: Implements Riverpod 2.0 for efficient state handling.
  • Navigation: Uses GoRouter for declarative routing.
  • Performance: Offers tips for optimizing Flutter app performance.
  • Use Case: Develop a scalable, maintainable Flutter e-commerce app with a clean feature-first project structure and robust state management.

Quick Start

Use the flutter-patterns skill to generate a new Flutter project structure following the feature-first approach.

Frequently Asked Questions about flutter-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the best way to structure a Flutter app using Dart 3?▼

The best way to structure a Flutter app with Dart 3 is using a feature-first project approach, organizing widgets via StatelessWidget and StatefulWidget, and leveraging sealed classes for cleaner architecture.

How do I manage state in Flutter with Riverpod?▼

Manage state in Flutter with Riverpod 2.0 by implementing its efficient state handling patterns, which provide robust state management for scalable mobile applications and clean widget architecture.

How do I set up declarative routing in Flutter with GoRouter?▼

Set up declarative routing in Flutter with GoRouter by following structured navigation patterns, enabling maintainable route management and scalable mobile application development across platforms.

When do I need sealed classes and pattern matching in Dart 3?▼

You need sealed classes and pattern matching in Dart 3 when building production-ready Flutter applications, as these modern features enable cleaner code and robust widget architecture.

Does this Flutter state management approach support cross-platform deployment?▼

Yes, this Flutter state management approach supports cross-platform deployment strategies, offering platform-specific considerations and performance optimization for scalable mobile application development.

How do I optimize Flutter app performance for production?▼

Optimize Flutter app performance for production by applying specific performance tips, structured widget architecture, and efficient Riverpod state handling to ensure maintainable applications.