canSelectAll method

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

Whether the current selection of the text field managed by the given delegate can be extended to include the entire content of the text field.

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


  'Use `contextMenuBuilder` instead. '
  'This feature was deprecated after v3.3.0-0.5.pre.',
bool canSelectAll(TextSelectionDelegate delegate) {
  return delegate.selectAllEnabled && delegate.textEditingValue.text.isNotEmpty && delegate.textEditingValue.selection.isCollapsed;