INNER CODE UNIT · Dart

verticalRadius

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

    final double verticalRadius = widget.bottom - widget.top;
    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({

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…