INNER CODE UNIT · Dart

horizontalDelta

Klerith/animate_do_package · lib/src/custom_animation/move_to_arc.dart:61

    final double horizontalDelta = widget.right - widget.left;

    final double offsetY = widget.upward
        ? -verticalRadius.abs() * sin(angle)
        : verticalRadius * (1 - cos(angle));

    final double offsetX = horizontalDelta * t;

    return Transform.translate(
      offset: Offset(offsetX, offsetY),
      child: child,
    );
  }
}

extension MoveArcExtension on Widget {
  Widget moveToArc({
    Key? key,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…