getDragStartPositionAlignment function

Alignment getDragStartPositionAlignment(
  1. double xPosition,
  2. double yPosition,
  3. double width,
  4. double height,
)

Implementation

Alignment getDragStartPositionAlignment(
  double xPosition,
  double yPosition,
  double width,
  double height,
) {
  if (xPosition > width / 2) {
    return yPosition > height / 2 ? Alignment.bottomRight : Alignment.topRight;
  } else {
    return yPosition > height / 2 ? Alignment.bottomLeft : Alignment.topLeft;
  }
}