buildEntryAnimation function
Widget
buildEntryAnimation({
- required Widget child,
- required Animation<
double> animation, - required MaterialPinAnimation type,
Builds an entry animation transition for PIN cell content.
This creates the appropriate transition based on the animation type.
For MaterialPinAnimation.custom, returns the child unchanged since
custom animations are handled separately via customBuilder.
Implementation
Widget buildEntryAnimation({
required Widget child,
required Animation<double> animation,
required MaterialPinAnimation type,
}) {
switch (type) {
case MaterialPinAnimation.scale:
return ScaleTransition(scale: animation, child: child);
case MaterialPinAnimation.fade:
return FadeTransition(opacity: animation, child: child);
case MaterialPinAnimation.slide:
return SlideTransition(
position: Tween(
begin: const Offset(0, 0.5),
end: Offset.zero,
).animate(animation),
child: child,
);
case MaterialPinAnimation.none:
case MaterialPinAnimation.custom:
// Custom is handled by customBuilder in getEntryAnimationTransitionBuilder
return child;
}
}