agentleFS
terrene-foundationterrene-foundation/pact/.claude/skills/19-flutter-patterns/SKILL.md

flutter-patterns

Skill0 starsChanged 7 months agoApache-2.0View on GitHub

Flutter development patterns including design system creation, responsive layouts, state management, and cross-platform best practices. Use when asking about 'Flutter design system', 'Flutter patterns', 'responsive Flutter', 'Flutter components', 'Flutter theming', 'dark mode', 'Flutter architecture', or 'cross-platform Flutter'.

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when:

    line 116

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Flutter Development Patterns

Production-ready patterns for Flutter application development including design systems, responsive layouts, and enterprise-grade component libraries.

Overview

Flutter patterns for:

  • Design system creation and management
  • Responsive layout strategies
  • Component library architecture
  • State management patterns
  • Cross-platform considerations

Reference Documentation

Design System Creation

  • creating-design-system - Complete guide to creating Flutter design systems
    • Phase-based implementation approach
    • Token systems (colors, typography, spacing)
    • Component architecture
    • Responsive patterns
    • Dark mode support
    • Documentation standards

Design System Usage

  • flutter-design-system - Institutionalized design system usage directive
    • Design system location and structure
    • Single import pattern
    • Component usage examples
    • Mandatory usage rules

Testing Patterns

  • flutter-testing-patterns - Flutter testing strategies
    • Widget testing patterns
    • Integration testing
    • Golden tests
    • Test organization

Quick Patterns

Design Token System

abstract class AppColors {
  // Primary palette
  static const primary = Color(0xFF2563EB);
  static const primaryLight = Color(0xFF3B82F6);
  static const primaryDark = Color(0xFF1D4ED8);

  // Semantic colors
  static const success = Color(0xFF10B981);
  static const warning = Color(0xFFF59E0B);
  static const error = Color(0xFFEF4444);
}

abstract class AppSpacing {
  static const xs = 4.0;
  static const sm = 8.0;
  static const md = 16.0;
  static const lg = 24.0;
  static const xl = 32.0;
}

Responsive Breakpoints

class Breakpoints {
  static const mobile = 600.0;
  static const tablet = 900.0;
  static const desktop = 1200.0;

  static bool isMobile(BuildContext context) =>
    MediaQuery.of(context).size.width < mobile;
}

Component Base Pattern

class AppButton extends StatelessWidget {
  final String label;
  final VoidCallback onPressed;
  final ButtonVariant variant;

  const AppButton({
    required this.label,
    required this.onPressed,
    this.variant = ButtonVariant.primary,
  });

  @override
  Widget build(BuildContext context) {
    return ElevatedButton(
      onPressed: onPressed,
      style: _getStyle(variant),
      child: Text(label),
    );
  }
}

CRITICAL Gotchas

RuleWhy
❌ NEVER hardcode colorsUse design tokens
✅ ALWAYS use const constructorsPerformance optimization
❌ NEVER use magic numbersUse spacing tokens
✅ ALWAYS test on multiple screen sizesResponsive verification

When to Use This Skill

Use this skill when:

  • Creating a new Flutter design system
  • Building reusable component libraries
  • Implementing responsive layouts
  • Setting up theme systems (light/dark mode)
  • Architecting Flutter applications

Related Skills

  • 11-frontend-integration - Frontend integration patterns
  • 17-gold-standards - Best practices
  • 21-enterprise-ai-ux - Enterprise UX patterns
  • 23-uiux-design-principles - Framework-agnostic design principles (CRITICAL)

Support

For Flutter pattern questions, invoke:

  • flutter-specialist - Flutter-specific implementation
  • uiux-designer - Design system decisions
  • pattern-expert - Architecture patterns

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.