CupertinoAdaptiveTextSelectionToolbar.selectable constructor
- Key? key,
- required VoidCallback onCopy,
- required VoidCallback onSelectAll,
- required SelectionGeometry selectionGeometry,
- required TextSelectionToolbarAnchors anchors,
Create an instance of CupertinoAdaptiveTextSelectionToolbar with the default children for selectable, but not editable, content.
See also:
- AdaptiveTextSelectionToolbar.selectable, which is similar to this but includes Material and Cupertino toolbars.
- CupertinoAdaptiveTextSelectionToolbar.new, which takes the children directly as a list of widgets.
- CupertinoAdaptiveTextSelectionToolbar.buttonItems, which takes a list of ContextMenuButtonItems instead of children widgets.
- CupertinoAdaptiveTextSelectionToolbar.editable, which builds the default Cupertino children for an editable field.
- CupertinoAdaptiveTextSelectionToolbar.editableText, which builds the default Cupertino children for an EditableText.
Implementation
CupertinoAdaptiveTextSelectionToolbar.selectable({
super.key,
required VoidCallback onCopy,
required VoidCallback onSelectAll,
required SelectionGeometry selectionGeometry,
required this.anchors,
}) : children = null,
buttonItems = SelectableRegion.getSelectableButtonItems(
selectionGeometry: selectionGeometry,
onCopy: onCopy,
onSelectAll: onSelectAll,
onShare: null, // See https://github.com/flutter/flutter/issues/141775.
);