suggestions property

  1. @override
List<AssistMessageSuggestion>? suggestions
final

Suggestions for the assist message.

The suggestion is used to provide users with quick responses or actions they can take based on the message content.It can be a list of predefined options that the user can select from to enhance the interaction experience.

Example:

List<AssistMessage> _messages = <AssistMessage>[
  AssistMessage.response(
    data:
      "Flutter is a UI toolkit for building natively compiled apps across"
      "mobile, web, and desktop.",
    suggestions: <AssistMessageSuggestion>[
      AssistMessageSuggestion(
        content: const TextSpan(text: 'Widgets'),
      ),
      AssistMessageSuggestion(
        content: const TextSpan(text: 'State management'),
      ),
      AssistMessageSuggestion(
        content: const TextSpan(text: 'Layouts and constraints'),
      ),
    ],
  ),
];

Implementation

@override
final List<AssistMessageSuggestion>? suggestions;