Skip to content
Development
Skill

/flutter-widgets

Build maintainable Flutter UI components with composition and theming. Use when changing widget implementation; defer animation-only changes and widget-test authoring.

From plugin
agent-skills-standard
583200 skills21 agents33 commands1 MCP

Claude Code

$ npx -y skills add hoangnguyen0403/agent-skills-standard --skill flutter-widgets --agent claude-code

SKILL.md

flutter-widgets.SKILL.md
name: flutter-widgets
description: Build maintainable Flutter UI components with composition and theming. Use when changing widget implementation; defer animation-only changes and widget-test authoring.
metadata:
  triggers:
    files:
    - '**_page.dart'
    - '**_screen.dart'
    - '**/widgets/**'
    keywords:
    - StatelessWidget
    - const
    - Theme
    - ListView

UI & Widgets

**Priority: P1 (HIGH)**

  • **State**: Use `StatelessWidget` by default. `StatefulWidget` only for local state/controllers.
  • **Composition**: Extract UI into small, atomic `const` widgets.
  • **Theming**: Use `Theme.of(context)`. No hardcoded colors.
  • **Layout**: Use `Flex` + `Gap/SizedBox`.
  • **Widget Keys**: All interactive elements must use keys from `widget_keys.dart`.
  • **File Size**: If UI file exceeds ~80 lines, extract sub-widgets into private classes.
  • **Specialized**:
  • `SelectionArea`: For multi-widget text selection.
  • `InteractiveViewer`: For zoom/pan.
  • `ListWheelScrollView`: For pickers.
  • `IntrinsicWidth/Height`: Avoid unless strictly required.
  • **Large Lists**: Always use `ListView.builder`.
class AppButton extends StatelessWidget {
  final String label;
  final VoidCallback onPressed;
  const AppButton({super.key, required this.label, required this.onPressed});

  @override
  Widget build(BuildContext context) => ElevatedButton(onPressed: onPressed, child: Text(label));
}

Anti-Patterns

  • **No setState for server state**: Server or shared state belongs in BLoC, not widget state.
  • **No widget file over 80 lines without extraction**: Extract sub-widgets into private classes.
  • **No inline Key strings**: All keys must constants defined in `widget_keys.dart`.
  • **No \_buildXxx() helper methods**: Extract to `const StatelessWidget` private class.
  • **No manual widget repetition**: When 3+ sibling widgets of the same type differ only in data (e.g., radio buttons, tabs), map over a list instead. Put display labels inside the value object or a companion map so adding an option requires no UI change.

References

  • performance | testing

Canonical response anchors

When this skill applies, preserve the following domain terminology or equivalent concrete examples in the answer when relevant:

  • Extract
  • interactive elements
  • into private
Read more
@hoangnguyen0403
Ships withagent-skills-standard

The portable standards layer for AI coding agents. Sync once, then work in your own runtime.

583200 skills21 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
583
Star history of hoangnguyen0403/agent-skills-standard on GitHub, a chart by star-history.com

Other skills on agent-skills-standard.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about flutter-widgets.

Which coding agents can use flutter-widgets?
flutter-widgets installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.