isThrowText method

bool isThrowText(
  1. Offset pointer,
  2. BaseFloatModel target
)

decided whether the text is deleted or not.

Implementation

bool isThrowText(Offset pointer,BaseFloatModel target) {
  final Rect textR = Rect.fromCenter(center: pointer,
      width: target.floatSize?.width??1,
      height: target.floatSize?.height??1);
  final Rect tcR = Rect.fromLTWH(
      screenSize!.width - trashCanPosition.dx,
      screenSize!.height - trashCanPosition.dy - tcSize.height,
      tcSize.width,
      tcSize.height);
  return textR.overlaps(tcR);
}