flutter-animations
Comprehensive guide for implementing animations in Flutter with decision trees and patterns for every animation type.
- Covers five animation approaches: implicit animations (AnimatedContainer, AnimatedOpacity, TweenAnimationBuilder), explicit animations (AnimationController, Tween, AnimatedWidget/AnimatedBuilder), hero animations (shared element transitions), staggered animations (sequential/overlapping with Interval timing), and physics-based animations (spring, gravity, fling)
- Includes decision tree for choosing the right animation type based on control needs, property count, and user interaction patterns
- Provides complete code examples for each pattern, from simple fade transitions to complex staggered menu reveals and radial hero animations
- Built-in performance tips: controller disposal, AnimatedBuilder for optimal rebuilds, avoiding setState() in listeners, and timeDilation for debugging
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
- 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.
- Inspect the local Flutter context first when code is available: widget tree,
More from madteacher/mad-agents-skills
flutter-adaptive-ui
Build, fix, review, and validate adaptive or responsive Flutter UIs for mobile, tablet, desktop, web, large screens, foldables, and mixed input devices. Use when creating breakpoint-driven layouts, responsive navigation, adaptive dialogs/lists/grids, keyboard/mouse/touch behavior, window-size decisions with MediaQuery or LayoutBuilder, or Capability and Policy patterns for platform-specific behavior.
1.5Kflutter-architecture
>-
1.4Kflutter-testing
>-
1.2Kflutter-networking
>-
552flutter-navigation
>-
440flutter-drift
Implement, fix, review, migrate, test, or debug Drift persistence in Flutter apps using SQLite, drift_flutter, type-safe Dart queries, generated tables, StreamBuilder or Riverpod StreamProvider UI, write operations, transactions, schema migrations, web assets, isolate sharing, and local database testing. Use when a Flutter task mentions drift, local database storage, SQLite, reactive database streams, CRUD, schemaVersion, build_runner, drift_dev make-migrations, migration tests, or Flutter-specific database setup across mobile, web, or desktop.
419