金色时刻 · 15:48
让好资源,触手可及
AGENT SKILL

idiomatic-flutter

idiomatic-flutter 是面向软件开发的 Agent Skill,来自 HoangNguyen0403/agent-skills-standard。查看技能说明、操作步骤与使用约定,并通过原项目了解详细用法。

Modern layout and widget composition standards.

SKILL.md

下载 MD ↓
nameIdiomatic Flutter
descriptionModern layout and widget composition standards.
metadata{"labels": ["flutter", "clean-code", "widgets"], "triggers": {"files": ["lib/presentation/**/*.dart"], "keywords": ["context.mounted", "SizedBox", "Gap", "composition", "shrink"]}}

Idiomatic Flutter

Priority: P1 (OPERATIONAL)

Modern Flutter layout patterns and composition techniques.

  • Async Gaps: Check if (context.mounted) before using BuildContext after await.
  • Composition: Extract complex UI into small widgets. Avoid deep nesting or large helper methods.
  • Layout:
  • Spacing: Use Gap(n) or SizedBox over Padding for simple gaps.
  • Empty UI: Use const SizedBox.shrink().
  • Intrinsic: Avoid IntrinsicWidth/Height; use Stack + FractionallySizedBox for overlays.
  • Optimization: Use ColoredBox/Padding/DecoratedBox instead of Container when possible.
  • Themes: Use extensions for Theme.of(context) access.

来源:HoangNguyen0403/agent-skills-standard · MIT 许可 · 许可原文 · MD 为来源页保存的历史版本