fromTop static method
Slide animation, from top to bottom (SlideTransition)
Implementation
static Widget fromTop(
Animation<double> animation,
Animation<double> secondaryAnimation,
Widget child,
) {
return FadeTransition(
opacity: animation,
child: SlideTransition(
position: Tween<Offset>(
begin: const Offset(0, -0.2),
end: Offset.zero,
).animate(
CurvedAnimation(
parent: animation,
curve: Curves.ease,
),
),
child: child,
),
);
}