AssistMessageToolbarItem class
Toolbar item for assist message, which is show below the response message bubble.
The AssistMessageToolbarItem class stores widget as content, tooltip value to show when hover on the toolbar item, and isSelected to indicate whether the item is currently selected
Example:
List<AssistMessage> _messages = <AssistMessage>[
AssistMessage.response(
data: responseText,
toolbarItems: <AssistMessageToolbarItem>[
const AssistMessageToolbarItem(
tooltip: 'Like',
content: Icon(Icons.thumb_up_outlined),
),
const AssistMessageToolbarItem(
tooltip: 'DisLike',
content: Icon(Icons.thumb_down_outlined),
),
const AssistMessageToolbarItem(
tooltip: 'Copy',
content: Icon(Icons.copy_all),
),
const AssistMessageToolbarItem(
tooltip: 'Restart',
content: Icon(Icons.restart_alt),
),
],
)
];
Constructors
- AssistMessageToolbarItem({required Widget content, String? tooltip, bool isSelected = false})
-
const
Properties
- content → Widget
-
Holds the widget to display as the content of a toolbar item, and it can
be any type of widget.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isSelected → bool
-
To indicates whether a toolbar item is currently selected or not.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tooltip → String?
-
Hold the string value to display as a tooltip when hovering over a
toolbar item.
final
Methods
-
copyWith(
{Widget? content, String? tooltip, bool? isSelected}) → AssistMessageToolbarItem -
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