transform method
Implementation
@override
Widget transform(BuildContext context, Widget page, int index, int? currentPage, double pageDelta, int itemCount) {
if (index == currentPage) {
final double scale = endScale + (1 - endScale) * (1 - pageDelta);
return Transform(
alignment: Alignment.center,
transform: Matrix4.identity()..scale(scale, scale),
child: page,
);
} else {
return page;
}
}