incomingMessageSettings property

ChatMessageSettings incomingMessageSettings
final

Options for changing the appearance and behavior of incoming chat bubbles.

The incomingMessageSettings property allows you to configure how incoming chat bubbles are displayed. This includes customization options for the user's avatar, username, timestamp, content background color, and various padding and shape options.

If a new instance is not assigned to this property, the default settings for incoming chat bubbles will be used.


@override
Widget build(BuildContext context) {
  return SfChat(
    incomingMessageSettings: ChatMessageSettings(
      showAuthorName: true,
      showTimestamp: true,
      showAuthorAvatar: true,
      widthFactor: 0.8,
      avatarSize: const Size.square(32.0),
      margin: const EdgeInsets.all(2.0),
      padding:
          const EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0),
      headerPadding:
          const EdgeInsetsDirectional.only(top: 14.0, bottom: 4.0),
      footerPadding: const EdgeInsetsDirectional.only(top: 4.0),
    ),
  );
}

Implementation

final ChatMessageSettings incomingMessageSettings;