itemShape property
Used to customize the shape of individual suggestion items based on their state, such as hovered or pressed.
Defaults to null
.
Example:
List<ChatMessage> _messages = <ChatMessage>[
ChatMessage(
suggestionSettings: ChatSuggestionSettings(
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;