AdaptiveTextSelectionToolbar class Null safety

The default context menu for text selection for the current platform.

Typically, this widget would be passed to contextMenuBuilder in a supported parent widget, such as:

See also:

Inheritance

Constructors

AdaptiveTextSelectionToolbar({Key? key, required List<Widget>? children, required TextSelectionToolbarAnchors anchors})
Create an instance of AdaptiveTextSelectionToolbar with the given children.
const
AdaptiveTextSelectionToolbar.buttonItems({Key? key, required List<ContextMenuButtonItem>? buttonItems, required TextSelectionToolbarAnchors anchors})
Create an instance of AdaptiveTextSelectionToolbar whose children will be built from the given buttonItems.
const
AdaptiveTextSelectionToolbar.editable({Key? key, required ClipboardStatus clipboardStatus, required VoidCallback? onCopy, required VoidCallback? onCut, required VoidCallback? onPaste, required VoidCallback? onSelectAll, required TextSelectionToolbarAnchors anchors})
Create an instance of AdaptiveTextSelectionToolbar with the default children for an editable field.
AdaptiveTextSelectionToolbar.editableText({Key? key, required EditableTextState editableTextState})
Create an instance of AdaptiveTextSelectionToolbar with the default children for an EditableText.
AdaptiveTextSelectionToolbar.selectable({Key? key, required VoidCallback onCopy, required VoidCallback onSelectAll, required SelectionGeometry selectionGeometry, required TextSelectionToolbarAnchors anchors})
Create an instance of AdaptiveTextSelectionToolbar with the default children for selectable, but not editable, content.
AdaptiveTextSelectionToolbar.selectableRegion({Key? key, required SelectableRegionState selectableRegionState})
Create an instance of AdaptiveTextSelectionToolbar with the default children for a SelectableRegion.

Properties

anchors TextSelectionToolbarAnchors
The location on which to anchor the menu.
final
buttonItems List<ContextMenuButtonItem>?
The ContextMenuButtonItems 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.
read-onlyinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

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 non-existent 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 the default context menu buttons for the current platform.
getButtonLabel(BuildContext context, ContextMenuButtonItem buttonItem) String
Returns the default button label String for the button of the given ContextMenuButtonType on any platform.