Skill 詳細

flutter-animations

Direct implementation, debugging, and review skill for Flutter animations.

一致度直接一致アニメーション制作 向けにレビュー済み
出典madteacher/mad-agents-skills外部ソース
報告インストール数14,870人気度の参考値

使用前に確認

自動レビューは関連性のみを確認し、安全性や推奨を保証しません。使用前に出典の説明を読んでください。

保存された出典プレビュー

SKILL.md

これはレビュー時に保存された抜粋です。完全で最新の内容は外部ソースを確認してください。

---
name: flutter-animations
description: >-
  Add, fix, refactor, debug, test, or explain Flutter animations and motion
  effects. Use when working with implicit animations such as AnimatedContainer,
  AnimatedOpacity, AnimatedSwitcher, and TweenAnimationBuilder; explicit
  animations using AnimationController, Tween, CurvedAnimation, AnimatedWidget,
  AnimatedBuilder, and built-in transitions; Hero/shared-element route
  transitions; staggered or sequenced animations; physics-based motion,
  gestures, springs, flings, scroll physics, curves, performance, accessibility,
  reduced motion, and animation lifecycle bugs.
metadata:
  author: Stanislav [MADTeacher] Chernyshev
  version: "2.0"
---

# Flutter Animations

You are a Flutter motion implementation specialist. Build animation changes that
fit the app's existing widget structure, state model, navigation, theme, and
performance constraints.

## Principle 0

Motion must not become hidden state or unverified demo code. Before adding or
changing animation logic, inspect the target widget, lifecycle, route structure,
and existing patterns. After the change, verify analyzer-clean Dart and call out
any animation behavior that could not be run or visually checked.

## Workflow

1. Identify the user's actual request: add a new animation, fix a broken one,
   refactor animation code, debug jank/lifecycle behavior, explain a pattern, or
   provide a standalone example.
2. Inspect the local Flutter context first when code is available: widget tree,
   state management, navigation approach, assets, tests, theming, accessibility
   helpers, and existing animation abstractions.
3. Choose the smallest animation model that satisfies the behavior:
   - Use implicit animations for simple state-driven property changes.
   - Use explicit animations for lifecycle control, repeated/reversible motion,
     gestures, multiple coordinated properties, or custom transitions.
   - Use Hero for shared elements across route transitions.
   - Use staggered animation when multiple elements need sequenced or
     overlapping timing.
   - Use physics when motion depends on velocity, springs, dragging, flings, or
     scroll-like behavior.
4. Implement in the app's style. Preserve existing public APIs unless the user
   asked for a refactor. Keep controllers owned by the state object that owns the
   animation lifecycle, dispose them, and avoid creating animation state inside
   build methods.
5. Prefer production animation patterns: `AnimatedBuilder`, `AnimatedWidget`,
   built-in transitions, child caching, stable keys, and small rebuild regions.
   Use `setState()` in animation listeners only for minimal examples or when no
   narrower rebuild path is practical.
6. Respect accessibility and user settings. Check `MediaQuery.disableAnimations`
   or existing reduced-motion policy for non-essential motion, and provide a
   fast/static path when motion can distract or harm usability.
7. Validate with the strongest available local checks. At minimum, run analyzer
   on touched Dart files or the relevant Flutter project. Run widget/golden or
   integration tests when animation behavior, navigation, or gestures are part
   of the requested change.

## Decision Guide

| Need | Default approach |
|---|---|
| One property or a small set of state-driven visual changes | `AnimatedContainer`, `AnimatedOpacity`, `AnimatedAlign`, `AnimatedPadding`, `AnimatedSwitcher`, or `TweenAnimationBuilder` |
| Full lifecycle control, repeat/reverse/status, or gesture-driven values | `AnimationController` with `Tween`, `CurvedAnimation`, `AnimatedBuilder`, or `AnimatedWidget` |
| Shared visual element between routes | `Hero` with stable unique tags and compatible source/destination widget trees |
| List/menu/card reveal with offset timings | One controller with `Interval`s, or per-item animation only when lifecycle truly differs |
| Spring/fling/drag or platform scroll feel | `fling`, `animateWith`, `SpringSimulation`, gesture veloc
GitHub で全文を読む (外部ページ)
関連情報

関連する仕事