ToolBarItem class

ToolBarItem This requires a widgetitem which will be shown on the text selection tool bar when a text is highlighted This class also gives you an option to choose between... ... flutter text selection controlscopy, paste, cut, select all or custom controls

Constructors

ToolBarItem({required Widget item, dynamic onItemPressed(String highlightedText, int startIndex, int endIndex)?, ToolBarItemControl? itemControl})

Properties

hashCode int
The hash code for this object.
no setterinherited
item Widget
The widget which will be shown on the text selection tool bar when a text is highlighted
final
itemControl ToolBarItemControl?
This gives you the option to use flutter text selection controls on your custom widget For instance, instead of having the text Copy on the tool bar,... ...you can have the Icon(Icons.copy) as the widget... ...and use ToolBarItemControl.copy control to copy the highlighted text when the icon is tapped
final
onItemPressed → (dynamic Function(String highlightedText, int startIndex, int endIndex)?)
This gives access the highlighted text, the start index and the end index of the highlighted text
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited