vertical method
Implementation
Widget vertical(double aniValue, int index, double page, Widget child) {
if (page == index) {
return child;
} else if (page > index) {
return LayoutBuilder(builder: (context, constraints) {
return Transform.translate(offset: Offset(0, constraints.maxHeight * (1 - aniValue)), child: child);
});
} else {
return LayoutBuilder(builder: (context, constraints) {
return Transform.translate(offset: Offset(0, -constraints.maxHeight * (1 - aniValue)), child: child);
});
}
}