responseLoadingBuilder property

AssistWidgetBuilder? responseLoadingBuilder
final

A callback function creates a widget to display as a loading indicator while waiting for a response.

This is particularly useful for displaying a loading spinner or other visual indicator to let the user know that the AI is processing the request.

By default shimmer effect will be shown as a loading indicator.

@override
Widget build(BuildContext context) {
  return SfAIAssistView(
    responseLoadingBuilder:(BuildContext context, int index, AssistMessage message) {
      return const Center(
        child: CustomLoadingIndicatorWidget(),
      );
    },
  );
}

Implementation

final AssistWidgetBuilder? responseLoadingBuilder;