AnimateZ: Flutter Package for Animating Widgets
Example Preview
Features
- Customizable animations: Define your own animation using
AnimationSpecwith properties likecurve,duration, andtween. - Pre-defined animation types: Choose from predefined animation types like
rotate,flip, andscale. - Easy to use: Wrap your child widget with
AnimateZWidgetand specify the desired animation parameters.
Usage
- Import the package:
import 'package:animate_z/animate_z.dart';
- Use the
AnimateZWidget:
AnimateZWidget(
child: Icon(Icons.star),
animate: true,
animationType: AnimationType.rotate, // Or AnimationType.flip, AnimationType.scale
customAnimation: AnimationSpec(
curve: Curves.easeIn,
duration: Duration(milliseconds: 500),
tween: Tween<double>(begin: 0.0, end: 1.0), // Rotate 1 full turn
),
),
--OR--
AnimateZWidget(
child: Icon(Icons.star),
animate: true,
animationType: AnimationType.rotate, // Or AnimationType.flip, AnimationType.scale
),
Explanation:
- This example creates a rotating star icon.
animateis set totrueto enable animation.animationTypeis set toAnimationType.rotate.customAnimationis used to define a custom animation with aneaseIncurve, a duration of 500 milliseconds, and a rotation animation.
License
See the LICENSE file for details.