onSingleLongTapEnd method

  1. @protected
void onSingleLongTapEnd(
  1. LongPressEndDetails details
)

Handler for TextSelectionGestureDetector.onSingleLongTapEnd.

By default, it shows toolbar if necessary.

See also:

Implementation

@protected
void onSingleLongTapEnd(LongPressEndDetails details) {
  _hideMagnifierIfSupportedByPlatform();
  if (shouldShowSelectionToolbar) {
    editableText.showToolbar();
  }
  _longPressStartedWithoutFocus = false;
  _dragStartViewportOffset = 0.0;
  _dragStartScrollOffset = 0.0;
  if (defaultTargetPlatform == TargetPlatform.iOS && delegate.selectionEnabled && editableText.textEditingValue.selection.isCollapsed) {
    // Update the floating cursor.
    final RawFloatingCursorPoint cursorPoint = RawFloatingCursorPoint(
      state: FloatingCursorDragState.End
    );
    editableText.updateFloatingCursor(cursorPoint);
  }
}