AssistMessageToolbarSettings class

Represents the settings for assist message footers.

The AssistMessageToolbarSettings is used to store customize details of a toolbar item in the response bubble. It allows setting shapes, colors, margin, and spacing for both the toolbar and its individual items.

Example:

@override
Widget build(BuildContext context) {
  return SfAIAssistView(
    responseToolbarSettings: AssistMessageToolbarSettings(
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(20.0),
      ),
      itemShape: WidgetStateProperty.resolveWith(
        (Set<WidgetState> state) {
          return const RoundedRectangleBorder(
              borderRadius: BorderRadius.all(Radius.circular(8.0)));
        },
      ),
      backgroundColor: Colors.red,
      itemBackgroundColor: WidgetStateProperty.resolveWith(
        (Set<WidgetState> state) {
          if (state.contains(WidgetState.selected)) {
            return Colors.blue;
          } else if (state.contains(WidgetState.focused)) {
            return Colors.blueGrey;
          } else if (state.contains(WidgetState.hovered)) {
            return Colors.lightBlueAccent;
          } else if (state.contains(WidgetState.disabled)) {
            return Colors.grey;
          }
          return Colors.lightBlue;
        },
      ),
      margin: const EdgeInsets.all(10),
      itemPadding: const EdgeInsets.all(10),
      spacing: 10,
      runSpacing: 10,
    ),
  );
}

Constructors

AssistMessageToolbarSettings({ShapeBorder? shape, WidgetStateProperty<ShapeBorder?>? itemShape, Color? backgroundColor, WidgetStateProperty<Color?>? itemBackgroundColor, EdgeInsetsGeometry margin = const EdgeInsetsDirectional.symmetric(vertical: 4.0), EdgeInsetsGeometry itemPadding = const EdgeInsets.all(9.0), double spacing = 8.0, double runSpacing = 8.0})
Creates a AssistMessageToolbarSettings with the given parameters.
const

Properties

backgroundColor → Color?
To set the background color of the footer area.
final
hashCode → int
The hash code for this object.
no setterinherited
itemBackgroundColor → WidgetStateProperty<Color?>?
To set the background color of individual footer items based on their state, such as hovered or pressed.
final
itemPadding → EdgeInsetsGeometry
To set the margin between the content of each individual footer item.
final
itemShape → WidgetStateProperty<ShapeBorder?>?
To set a customize shape of individual footer items based on their state, such as hovered or pressed.
final
margin → EdgeInsetsGeometry
To set margin between the footer area and individual footer items.
final
runSpacing → double
Used to sets a vertical spacing between runs of footer items.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shape → ShapeBorder?
To set a customize overall shape of the footer area.
final
spacing → double
Used to sets a horizontal spacing between individual footer items.
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