adaptiveTextSelectionToolbar static method

AdaptiveTextSelectionToolbar adaptiveTextSelectionToolbar({
  1. required EditableTextState editableTextState,
  2. List<FormattedTextContextMenuItem>? items,
})

Implementation

static AdaptiveTextSelectionToolbar adaptiveTextSelectionToolbar({
  required EditableTextState editableTextState,
  List<FormattedTextContextMenuItem>? items,
}) {
  return AdaptiveTextSelectionToolbar.buttonItems(
    anchors: editableTextState.contextMenuAnchors,
    buttonItems: [
      ...editableTextState.contextMenuButtonItems,
      for (final item in items ??
          FormattedTextDefaults.formattedTextDefaultContextMenuItems)
        _buildContextMenuButtonItem(
          editableTextState: editableTextState,
          label: item.label,
          patternChars: item.patternChars,
        )
    ],
  );
}