Chat constructor

const Chat({
  1. Key? key,
  2. Widget buildCustomMessage(
    1. Message,
    2. MessageContainBaseBuild
    )?,
  3. Widget buildListContentContain(
    1. Widget chatList
    )?,
  4. String customDateHeaderText(
    1. DateTime
    )?,
  5. DateFormat? dateFormat,
  6. String? dateLocale,
  7. bool? disableImageGallery,
  8. bool? isAttachmentUploading,
  9. bool? isLastPage,
  10. ChatL10n l10n = const ChatL10nEn(),
  11. required List<Message> messages,
  12. void onAttachmentPressed()?,
  13. Future<void> onEndReached()?,
  14. double? onEndReachedThreshold,
  15. void onMessageLongPress(
    1. Message
    )?,
  16. void onMessageTap(
    1. Message
    )?,
  17. void onPreviewDataFetched(
    1. TextMessage,
    2. PreviewData
    )?,
  18. required void onSendPressed(
    1. PartialText
    ),
  19. void onTextChanged(
    1. String
    )?,
  20. bool showUserAvatars = false,
  21. bool showUserNames = false,
  22. ChatTheme theme = const DefaultChatTheme(),
  23. DateFormat? timeFormat,
  24. bool usePreviewData = true,
  25. required User user,
})

Creates a chat widget

Implementation

const Chat({
  Key? key,
  this.buildCustomMessage,
  this.buildListContentContain,
  this.customDateHeaderText,
  this.dateFormat,
  this.dateLocale,
  this.disableImageGallery,
  this.isAttachmentUploading,
  this.isLastPage,
  this.l10n = const ChatL10nEn(),
  required this.messages,
  this.onAttachmentPressed,
  this.onEndReached,
  this.onEndReachedThreshold,
  this.onMessageLongPress,
  this.onMessageTap,
  this.onPreviewDataFetched,
  required this.onSendPressed,
  this.onTextChanged,
  this.showUserAvatars = false,
  this.showUserNames = false,
  this.theme = const DefaultChatTheme(),
  this.timeFormat,
  this.usePreviewData = true,
  required this.user,
}) : super(key: key);