canCut method

  1. @Deprecated('Use `contextMenuBuilder` instead. ' 'This feature was deprecated after v3.3.0-0.5.pre.')
bool canCut(
  1. TextSelectionDelegate delegate
)

Whether the current selection of the text field managed by the given delegate can be removed from the text field and placed into the Clipboard.

By default, false is returned when nothing is selected in the text field.

Subclasses can use this to decide if they should expose the cut functionality to the user.

Implementation

@Deprecated(
  'Use `contextMenuBuilder` instead. '
  'This feature was deprecated after v3.3.0-0.5.pre.',
)
bool canCut(TextSelectionDelegate delegate) {
  return delegate.cutEnabled && !delegate.textEditingValue.selection.isCollapsed;
}