verticalFlip method
Implementation
@override
Widget verticalFlip(double aniValue, int index, double page, Widget child) {
return Row(
children: List.generate(shutterSize, (indexSub) {
double intervalAni = 0;
// if (page > index) {
// intervalAni = Interval(indexSub / shutterSize, (indexSub + 1) / shutterSize).transform(aniValue.abs());
// // return SizedBox.shrink();
// } else {
// intervalAni = Interval((shutterSize - indexSub - 1) / shutterSize, (shutterSize - indexSub) / shutterSize)
// .transform(aniValue.abs());
// }
if (page > index) {
intervalAni = Interval(indexSub * delay, 1-(shutterSize - indexSub) * delay).transform(aniValue.abs());
// return SizedBox.shrink();
} else {
int sub = shutterSize - indexSub;
intervalAni = Interval(sub * delay, 1-(shutterSize - sub) * delay)
.transform(aniValue.abs());
}
return ClipRect(
child: Align(
widthFactor: 1 / shutterSize,
alignment: FractionalOffset(indexSub / (shutterSize - 1), 0),
child: SizedBox(width: mediaQuery.size.width, child: super.verticalFlip(intervalAni, index, page, child)),
),
);
}),
);
}