easy_animated_indexed_stack
0.1.0, released a year ago by an unverified publisher
Drop‑in replacement for IndexedStack with animated transitions
WASM-ready
What it does
Provides an EasyAnimatedIndexedStack widget that animates child changes using a custom animation builder. It replaces Flutter’s IndexedStack while allowing animation customization such as curve, duration, and skip parameters.
AI-written summary of version 0.1.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need animated transitions between indexed children
- You want a simple, drop‑in replacement for IndexedStack
- You prefer declarative widget composition over manual animation controllers
Skip it when
- You need complex, physics‑based or physics‑based motion
- You require fine‑grained control over animation timing beyond the provided builder
Strengths
- Simple API, drop‑in replacement
- Customizable animation via builder
- No external dependencies
- Cross‑platform support
Weaknesses
- Limited to indexed stack use cases
- No built‑in physics or advanced animation features
- No state‑management integration
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Add dependency to pubspec and replace IndexedStack with EasyAnimatedIndexedStack
```dart
EasyAnimatedIndexedStack(
index: selectedIndex,
animationBuilder: (context, animation, child) {
return RotationTransition(
turns: Tween<double>(begin: 1, end: 0).animate(animation),
child: child,
);
},
curve: Curves.easeInOut,
duration: const Duration(milliseconds: 700),
children: [
ScreenA(onTap: () => setState(() => selectedIndex = 1)),
ScreenB(onTap: () => setState(() => selectedIndex = 2)),
ScreenC(onTap: () => setState(() => selectedIndex = 0)),
],
)
```Alternatives
Packages that do the same job and could replace easy_animated_indexed_stack.
- flutter_animate
Provides a broader set of implicit animations for widgets
70Compare - page_transition
Offers page transition animations for navigation
77Compare