animated_size_and_fade
5.1.5, released today by glasberg.dev
Fade and size transition between widgets or show/hide a widget.
WASM-readyRock solid
What it does
Allows a fade and size transition when changing child widgets without needing to know their sizes in advance. Also provides a constructor to show and hide a widget by resizing it vertically while fading.
AI-written summary of version 5.1.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to animate both size and opacity when changing a child widget.
- You want to show and hide a widget with a vertical resize and fade effect.
- You do not know the exact sizes of the children in advance.
Skip it when
- You only want to animate opacity without size changes.
- You need complex physics-based motion or Rive/Lottie animations.
Strengths
- Simpler to use than AnimatedCrossFade when changing a single child dynamically.
- No need to know child sizes in advance like AnimatedContainer.
- Provides completion callbacks for fades and size changes.
Weaknesses
- Requires a Key to force cross-fading if replacing a widget of the same type with different parameters.
- Fade and size transitions are vertically oriented for show/hide.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
AnimatedSizeAndFade(
child: toggle ? widget1 : widget2
);Alternatives
Packages that do the same job and could replace animated_size_and_fade.
- flutter_animate
For rich, chainable animation effects across multiple properties.
70Compare