layout_motion 0.5.0
layout_motion: ^0.5.0 copied to clipboard
Automatic FLIP layout animations for Flutter. Wrap any Column, Row, Wrap, or Stack to animate add, remove, and reorder with zero configuration.
0.5.0 #
- NEW: Drag-to-Reorder — long-press and drag children to reorder with smooth FLIP animations for siblings. Set
onReorderto enable. Customize the dragged child appearance withdragDecorator. - NEW:
ExitLayoutBehavior.pop— exiting children are immediately removed from layout flow and animate out as positioned overlays. Remaining children slide into freed space instantly. SetexitLayoutBehavior: ExitLayoutBehavior.popto enable. - NEW:
onChildMovecallback — fires when a child begins its move animation, completing the lifecycle callback set alongsideonChildEnterandonChildExit. - Add Drag-to-Reorder and Pop Exit Mode demos to example app
0.4.0 #
- NEW: Staggered animations — cascading delays with
staggerDurationandstaggerFrom(first,last,center) - NEW: Animation lifecycle callbacks —
onAnimationStart,onAnimationComplete,onChildEnter,onChildExit - NEW: Auto-detect reduced motion —
enabledis nowbool?(nullable);null(default) auto-readsMediaQuery.disableAnimations - NEW: Spring physics —
MotionSpringclass with presets (gentle,smooth,bouncy,stiff) for physics-based move animations - NEW: Per-child curve control —
moveCurve,enterCurve,exitCurveoverride the globalcurveper animation type - NEW: Transition composition — use
operator+to combine transitions:const FadeIn() + const SlideIn() - NEW:
FadeSlideIn/FadeSlideOut— combined fade + slide preset - NEW:
FadeScaleIn/FadeScaleOut— combined fade + scale preset - NEW:
SizeIn/SizeOut— accordion/expand-collapse size transition - BREAKING:
enabledparameter changed frombool(defaulttrue) tobool?(defaultnull). Passenabled: trueto restore the previous behavior.
0.3.3 #
- FIX: Snap exiting children to their pre-removal visual position so they don't jump during exit transitions
- FIX: Stop in-progress move animations when exit starts to prevent offset override
- FIX: Include exiting children in snapshot capture for correct position tracking
- Add constructor assertion validating child is Column, Row, Wrap, or Stack
- Add Stack layout demo and Advanced Options demo to example app
- Add animation lifecycle stress tests (23 tests covering rapid updates, interruption, disposal)
- Fix example widget test (was broken boilerplate referencing wrong class)
- Add
flutter_testandflutter_lintsto example dev_dependencies - Exclude
example/from root analyzer to prevent cross-package analysis errors - Add GitHub Sponsors funding link to pubspec
0.3.2 #
- FIX: Preserve
spacingproperty when cloningColumnandRow(Flutter 3.27+) - FIX: Detect duplicate keys and throw
ArgumentErrorinstead of silently corrupting state - Wrap exiting children in
ExcludeSemanticsso screen readers skip disappearing elements - Add shared test helpers (
TestColumnApp,TestRowApp) and new tests for spacing, duplicate keys, semantics, clipBehavior, and enabled toggling - Add
.claude/andcoverage/to.gitignore; add.claude/and.github/to.pubignore
0.3.1 #
- FIX: Dispose
CurvedAnimationobjects before their parent controllers to prevent listener leaks - FIX: Defer
_entries.remove()in exit status listener to avoid map mutation during iteration - FIX: Replace per-frame
setStatein move animations with scopedAnimatedBuilderrebuilds - Guard status listeners against double-disposal when animations race
- Extract
AnimatedChildEntry.idle()factory to deduplicate entry creation - Update README: add
Stackreferences,moveThreshold/transitionDurationto API table, bump version
0.3.0 #
- FIX: Key validation now throws
ArgumentErrorin release builds (was assert-only) - Add configurable
moveThresholdparameter to control sub-pixel move filtering - Add
transitionDurationparameter for independent enter/exit animation timing - Add
Stacklayout support - Improve
AnimatedChildEntrytest coverage (isAnimating,dispose()) - Add
DiffResult.toString()andChildSnapshot.hashCodecoverage tests
0.2.1 #
- Add scale parameter assertions to
ScaleIn/ScaleOutconstructors - Add clarifying code comments for reversed animation and listener patterns
- Add README badges, migration guide, troubleshooting, and accessibility docs
- Add Row usage example to README
- Add Row layout demo to example app
- Add GitHub Actions CI and docs workflows
- Add RTL (right-to-left) tests
- Add performance tests with large child counts
0.2.0 #
- BREAKING: Rename
ScaleIn.beginScale→ScaleIn.scaleandScaleOut.endScale→ScaleOut.scalefor consistent parameter naming - Extract move-animation threshold to named constant
_moveThresholdwith documentation - Add comprehensive transition tests (FadeIn/Out, SlideIn/Out, ScaleIn/Out, custom transitions)
- Add move animation tests (reorder, interruption, sub-pixel threshold, Row support, combined add/remove+move)
0.1.0 #
- Initial release
MotionLayoutwidget with FLIP animation engine- Supports
Column,Row, andWraplayouts - Key-based diffing with LIS for optimal move detection
- Built-in transitions:
FadeIn/FadeOut,SlideIn/SlideOut,ScaleIn/ScaleOut - Custom transitions via
MotionTransitionbase class - Interruption-safe animations with smooth redirects
enabledflag andDuration.zerofor instant mode