build method
Widget
build(
- AnimationController controller,
- Widget? child,
- AntdAnimatedContext<
WidgetType, StateType> context
override
Implementation
@override
Widget build(AnimationController controller, Widget? child,
AntdAnimatedContext<WidgetType, StateType> context) {
var tween = Tween(begin: 0.0, end: 1.0).animate(
CurvedAnimation(
parent: controller,
curve: const Interval(0.5, 1, curve: Curves.easeOutCubic),
),
);
Animation<double> opacityAnimation = Tween(begin: 0.0, end: 1.0).animate(
CurvedAnimation(
parent: controller,
curve: const Interval(0.7, 1),
),
);
return ScaleTransition(
scale: tween,
child: FadeTransition(
opacity: opacityAnimation,
child: Center(
child: child,
),
),
);
}