CupertinoAdaptiveTextSelectionToolbar class
The default Cupertino context menu for text selection for the current platform with the given children.
Builds the mobile Cupertino context menu on all mobile platforms, not just iOS, and builds the desktop Cupertino context menu on all desktop platforms, not just MacOS. For a widget that builds the native-looking context menu for all platforms, see AdaptiveTextSelectionToolbar.
See also:
- AdaptiveTextSelectionToolbar, which does the same thing as this widget but for all platforms, not just the Cupertino-styled platforms.
- CupertinoAdaptiveTextSelectionToolbar.getAdaptiveButtons, which builds the Cupertino button Widgets for the current platform given ContextMenuButtonItems.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- CupertinoAdaptiveTextSelectionToolbar
Constructors
-
CupertinoAdaptiveTextSelectionToolbar({Key? key, required List<
Widget> ? children, required TextSelectionToolbarAnchors anchors}) -
Create an instance of CupertinoAdaptiveTextSelectionToolbar with the
given children.
const
-
Create an instance of CupertinoAdaptiveTextSelectionToolbar whose
children will be built from the given buttonItems.
const
- CupertinoAdaptiveTextSelectionToolbar.editable({Key? key, required ClipboardStatus clipboardStatus, required VoidCallback? onCopy, required VoidCallback? onCut, required VoidCallback? onPaste, required VoidCallback? onSelectAll, required VoidCallback? onLookUp, required VoidCallback? onSearchWeb, required VoidCallback? onLiveTextInput, required TextSelectionToolbarAnchors anchors})
- Create an instance of CupertinoAdaptiveTextSelectionToolbar with the default children for an editable field.
- CupertinoAdaptiveTextSelectionToolbar.editableText({Key? key, required EditableTextState editableTextState})
- Create an instance of CupertinoAdaptiveTextSelectionToolbar with the default children for an EditableText.
- CupertinoAdaptiveTextSelectionToolbar.selectable({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.
Properties
- anchors → TextSelectionToolbarAnchors
-
The location on which to anchor the menu.
final
-
The
ContextMenuButtonItem
s that will be turned into the correct button widgets for the current platform.final -
children
→ List<
Widget> ? -
The children of the toolbar, typically buttons.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getAdaptiveButtons(
BuildContext context, List< ContextMenuButtonItem> buttonItems) → Iterable<Widget> -
Returns a List of Widgets generated by turning
buttonItems
into the default context menu buttons for Cupertino on the current platform.