Command Palette

Search for a command to run...

Назад к скиллам
скилл № 84590

frontend-flutter

OPTIONAL, stack-specific: Flutter. Flutter projects only; the generic principles live in the `frontend` skill.

БесплатноБез исполняемых скриптов
crewforthот crewforth★ 26 звёзд на GitHub

Установить frontend-flutter в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Flutter (stack-specific layer)

Apply only when the project IS Flutter — its pubspec.yaml depends on the SDK (flutter: sdk: flutter). Otherwise do not use this skill: frontend and the project's own stack apply (see its Client stack order).

Trigger phrases: "riverpod", "go_router", "pubspec", "widget test", "analysis_options", "flutter_test", "golden test", "platform channel", "dart isolate", "gen-l10n"

For generic frontend discipline, applies the frontend skill; this file only covers what Flutter adds. Every rule below was checked against Flutter's own documentation (docs.flutter.dev, dart.dev) or the page of the package or platform it names; the depth and the sources are in references/, which also say what was not checked. Not used in a project on another stack (delete it if needed).

The project decides, not this file

  • Read before you write: pubspec.yaml (the packages already chosen), analysis_options.yaml (the lint set and formatter width), pubspec.lock, and how lib/ is already laid out. Follow them.
  • State management, routing, code generation and the lint set are the project's choice. Flutter's own guidance names no single state approach ("the best choice … depends on the app's complexity, your team's preferences"); built in are setState, ValueNotifier/ChangeNotifier and InheritedWidget. A package is added only when the user agrees, and recorded (adr). Never introduce a second state or routing approach beside the one in use.
  • A new project asks once, the same way frontend's Client stack step does: options and trade-offs, none marked recommended.

Architecture (Flutter's architecture guide; its "strongly recommend" items)

  • Two layers at least: UI (views + view models) and data (repositories + services). A repository is behind an abstract class, so tests can use a fake. No logic in widgets — a widget renders state and forwards events.
  • Unidirectional data flow and immutable models; a model that crosses a layer is not mutated in place.
  • Dependencies are injected into view models and repositories, not looked up from inside them. A domain layer only when the logic needs one (the guide marks it conditional). Where there is one it is plain Dart: no file in it imports package:flutter, and an architecture test reads its files and fails on such an import.
  • Feature folders (features/<name>/) with view, view model and tests together, as frontend says.

Widgets and rebuilds — the cost model

  • const constructors wherever possible; Flutter short-circuits the rebuild of a const subtree.
  • Split by what changes: keep setState (or the provider read) at the smallest subtree that needs it. A reusable piece of UI is a StatelessWidget, not a helper function returning a widget.
  • build() stays cheap: no I/O, parsing or allocation-heavy work in it — it runs on every ancestor rebuild.
  • Long lists and grids use the lazy builders (ListView.builder and friends), never a Column of every item.
  • Animations: no Opacity inside an animation (AnimatedOpacity/FadeInImage), no clipping while animating, and no widget that forces a saveLayer without a reason. Detail: references/rebuilds-and-performance.md.

Layout that adapts to the window

  • Decide by the window, never by the device type ("phone"/"tablet" checks are wrong on foldables, split screen and desktop). Measure with MediaQuery.sizeOf (the whole window; cheaper than MediaQuery.of) or LayoutBuilder (the space this widget is given). Breakpoints come from the project's design system; the Material window classes are compact < 600 · medium 600–839 · expanded 840–1199 · large 1200–1599 · ≥ 1600 dp.
  • List and detail: two panes side by side in an expanded window, a push to the detail in a compact one. What the user selected and what they typed survive a change of window class (a fold, a rotation, a resized window): that state lives above the two layouts, not inside either.
  • A foldable: when MediaQuery.displayFeatures holds a hinge that separates the window, the panes split at the hinge and no content is laid out on it.
  • Do not lock orientation — it is an accessibility problem. Keep scroll position across a layout change (PageStorageKey), and support mouse, trackpad and keyboard where the app runs on desktop or a large screen.
  • Accessibility: tap targets 48×48 (Android) / 44×44 (iOS), every tappable labelled, text contrast checked, the UI usable at large text scales — tested, not eyeballed (meetsGuideline, below). Detail and the test: references/adaptive-and-accessible.md. The a11y skill holds the rules for every stack.

Off the main isolate, across the platform boundary

  • Work that would take longer than a frame (decoding a large file, heavy parsing, image work) goe
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/adaptive-and-accessible.md
  • references/platform-async-release.md
  • references/rebuilds-and-performance.md
  • references/sensitive-data.md

FAQ

Что делает скилл frontend-flutter?

OPTIONAL, stack-specific: Flutter. Flutter projects only; the generic principles live in the `frontend` skill.

Как установить скилл frontend-flutter?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл frontend-flutter запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить frontend-flutter с