buildTransitions method
Widget
buildTransitions(
- BuildContext context,
- Animation<
double> animation, - Animation<
double> secondaryAnimation, - Widget child,
override
Creates transition which going forwards from tapped coordinates. A similar situation is with transition in reverse.
Implementation
@override
Widget buildTransitions(
BuildContext context,
Animation<double> animation,
Animation<double> secondaryAnimation,
Widget child,
) {
var _alignment = Alignment(0, 0);
if (tapDetails != null) {
final _converter = CoordinatesToAlignment(
point: tapDetails!.globalPosition,
screenSize: MediaQuery.of(context).size,
);
_alignment = _converter.convert();
}
return FadeTransition(
opacity: animation,
child: ScaleTransition(
scale: animation,
child: child,
alignment: _alignment,
),
);
}