itemShape property

Used to customize the shape of individual suggestion items based on their state, such as hovered or pressed.

Example:

List<AssistMessage> _messages = <AssistMessage>[
  AssistMessage.response(
    suggestionSettings: AssistSuggestionSettings(
      itemShape: WidgetStateProperty.resolveWith<ShapeBorder>(
          (Set<WidgetState> states) {
        if (states.contains(WidgetState.hovered)) {
          return RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(20),
          );
        }
        return RoundedRectangleBorder(
          borderRadius: BorderRadius.circular(5),
        );
      }),
    )
  ),
];

Implementation

@override
final WidgetStateProperty<ShapeBorder?>? itemShape;