bubbleFooterBuilder property

AssistWidgetBuilder? bubbleFooterBuilder
final

A callback function creates a widget to display as a footer within each message bubble.

The bubbleFooterBuilder allows you to specify a custom widget that will be shown as a footer within each message bubble. This is particularly useful for displaying timestamps or other additional information related to the message.

The callback accepts three parameters: BuildContext, message index in the list, and AssistMessage and returns a Widget.

If a new instance is not assigned to this property, it will use the default footer widget.

@override
Widget build(BuildContext context) {
  return SfAIAssistView(
    bubbleFooterBuilder:
        (BuildContext context, int index, AssistMessage message) {
      return Row(
        children: [
          IconButton(
            icon: const Icon(Icons.thumb_up),
            onPressed: () {
              // Handle thumb up button click.
            },
          ),
          IconButton(
            icon: const Icon(Icons.thumb_down),
            onPressed: () {
              // Handle thumb down button click.
            },
          ),
        ],
      );
    },
  );
}

Implementation

final AssistWidgetBuilder? bubbleFooterBuilder;