contextMenuButtonItems property

List<ContextMenuButtonItem> contextMenuButtonItems

Returns the ContextMenuButtonItems representing the buttons in this platform's default selection menu for EditableText.

See also:

Implementation

List<ContextMenuButtonItem> get contextMenuButtonItems {
  return buttonItemsForToolbarOptions() ?? EditableText.getEditableButtonItems(
    clipboardStatus: clipboardStatus.value,
    onCopy: copyEnabled
        ? () => copySelection(SelectionChangedCause.toolbar)
        : null,
    onCut: cutEnabled
        ? () => cutSelection(SelectionChangedCause.toolbar)
        : null,
    onPaste: pasteEnabled
        ? () => pasteText(SelectionChangedCause.toolbar)
        : null,
    onSelectAll: selectAllEnabled
        ? () => selectAll(SelectionChangedCause.toolbar)
        : null,
    onLookUp: lookUpEnabled
        ? () => lookUpSelection(SelectionChangedCause.toolbar)
        : null,
    onSearchWeb: searchWebEnabled
        ? () => searchWebForSelection(SelectionChangedCause.toolbar)
        : null,
    onShare: shareEnabled
        ? () => shareSelection(SelectionChangedCause.toolbar)
        : null,
    onLiveTextInput: liveTextInputEnabled
        ? () => _startLiveTextInput(SelectionChangedCause.toolbar)
        : null,
  )..addAll(_textProcessingActionButtonItems);
}