suggestionItemShape property

WidgetStateProperty<ShapeBorder?>? suggestionItemShape
final

Shape of the suggestion item, which can vary based on the widget's state. This uses a WidgetStateProperty to allow state-specific changes.

Widget build(BuildContext context) {
  return Scaffold(
    body: SfChatTheme(
      data: SfChatThemeData(
        suggestionItemShape:
            WidgetStateProperty.resolveWith<ShapeBorder>(
          (Set<WidgetState> states) {
            if (states.contains(WidgetState.hovered)) {
              return RoundedRectangleBorder(
                borderRadius: BorderRadius.circular(12.0),
              );
            }
            return RoundedRectangleBorder(
              borderRadius: BorderRadius.circular(8.0),
            );
          },
        ),
      ),
      child: SfChat(),
    ),
  );
}

Implementation

final WidgetStateProperty<ShapeBorder?>? suggestionItemShape;