translate static method
Implementation
static VillainAnimation translate({
Offset? fromOffset,
Offset? toOffset,
Duration from = Duration.zero,
Duration to = _kMaterialRouteTransitionLength,
Curve curve = Curves.linear,
}) =>
VillainAnimation(
from: from,
to: to,
curve: curve,
animatable: Tween<Offset>(begin: fromOffset, end: toOffset),
animatedWidgetBuilder: (animation, child) {
return SlideTransition(
position: animation as Animation<Offset>,
child: child,
);
});