AssistActionButton class
Represents a assist action button.
The AssistActionButton allows extensive customizations, including appearance, size, and behavior.
Example:
@override
Widget build(BuildContext context) {
return SfAIAssistView(
actionButton: AssistActionButton(
onPressed: (String newMessage) {
setState(() {
_messages.add(
AssistMessage.request(
data: newMessage,
),
);
});
},
),
);
}
Constructors
-
AssistActionButton({Widget? child, String? tooltip, Color? foregroundColor, Color? backgroundColor, Color? focusColor, Color? hoverColor, Color? splashColor, double? elevation, double? focusElevation, double? hoverElevation, double? highlightElevation, MouseCursor? mouseCursor, ShapeBorder? shape, EdgeInsetsGeometry padding = const EdgeInsetsDirectional.only(start: 8.0), Size size = const Size.square(40.0), required ValueChanged<
String> ? onPressed}) -
Creates a AssistActionButton with the given parameters.
const
Properties
- backgroundColor → Color?
-
Background color of the action button.
final
- child → Widget?
-
To display a widget inside the action button, such as icons and custom
widgets.
final
- elevation → double?
-
The elevation property specifies the shadow depth of the action button.
final
- focusColor → Color?
-
Color of the action button when it is focused.
final
- focusElevation → double?
-
Specifies the shadow depth of the action button when it is focused.
final
- foregroundColor → Color?
-
It specifies the foreground color of the action button.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- highlightElevation → double?
-
Specifies the shadow depth of the action button when it is highlighted.
final
- hoverColor → Color?
-
Color of the action button when it is hovered.
final
- hoverElevation → double?
-
Specifies the shadow depth of the action button when it is hovered.
final
- mouseCursor → MouseCursor?
-
Defines the mouse cursor appearance when hovering over the action button.
final
-
onPressed
→ ValueChanged<
String> ? -
Callback gets triggered when the action button is pressed.
final
- padding → EdgeInsetsGeometry
-
Padding of the action button.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shape → ShapeBorder?
-
Used to customize the shape of action button.
final
- size → Size
-
Specifies the dimensions of the action button.
final
- splashColor → Color?
-
Color of the action button when it is splashed.
final
- tooltip → String?
-
Tooltip message to be displayed when the action button is hovered.
final
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