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