INNER CODE UNIT · Dart
MoveToState
Klerith/animate_do_package · lib/src/custom_animation/move_to.dart:41
class MoveToState extends AnimateDoBaseState<MoveTo> {
late Animation<double> _translateX;
late Animation<double> _translateY;
@override
void createTweens() {
final CurvedAnimation curved =
CurvedAnimation(parent: controller, curve: widget.curve);
_translateX = Tween<double>(
begin: 0,
end: widget.right - widget.left,
).animate(curved);
_translateY = Tween<double>(
begin: 0,
end: widget.bottom - widget.top,
).animate(curved);