ChatThread constructor

const ChatThread({
  1. Key? key,
  2. required String path,
  3. required RoomClient room,
  4. GlobalKey<State<StatefulWidget>>? composerKey,
  5. List<Participant>? participants,
  6. List<String>? participantNames,
  7. bool includeLocalParticipant = true,
  8. bool startChatCentered = false,
  9. ChatMessage? initialMessage,
  10. void onMessageSent(
    1. ChatMessage
    )?,
  11. ChatThreadController? controller,
  12. Widget messageHeaderBuilder(
    1. BuildContext,
    2. MeshDocument,
    3. MeshElement
    )?,
  13. Widget waitingForParticipantsBuilder(
    1. BuildContext,
    2. List<String>
    )?,
  14. Widget attachmentBuilder(
    1. BuildContext context,
    2. FileAttachment upload
    )?,
  15. ValueChanged<FileAttachment>? onAttachmentOpen,
  16. ValueChanged<FileAttachment>? onAttachmentRemoved,
  17. Widget fileInThreadBuilder(
    1. BuildContext context,
    2. String path
    )?,
  18. Widget chatInputBoxBuilder(
    1. BuildContext context,
    2. Widget chatBox
    )?,
  19. ChatThreadCustomInputBuilder? customInputBuilder,
  20. FutureOr<void> openFile(
    1. String path
    )?,
  21. FileDropOverlayBuilder? fileDropOverlayBuilder,
  22. Widget toolsBuilder(
    1. BuildContext,
    2. ChatThreadController,
    3. ChatThreadSnapshot
    )?,
  23. Widget? inputPlaceholder,
  24. String? emptyStateTitle,
  25. String? emptyStateDescription,
  26. Widget? emptyState,
  27. String? agentName,
  28. FutureOr<void> onVisibleMessagesEmpty()?,
  29. bool initialShowCompletedToolCalls = false,
  30. bool shouldShowAuthorNames = true,
  31. bool showUsageFooter = false,
  32. EditableTextContextMenuBuilder? inputContextMenuBuilder,
  33. TapRegionCallback? inputOnPressedOutside,
  34. ThreadStorageSaveSurfacePresenter? mobileStorageSaveSurfacePresenter,
  35. double? mobileUnderHeaderContentPadding,
})

Implementation

const ChatThread({
  super.key,
  required this.path,
  required this.room,
  this.composerKey,
  this.participants,
  this.participantNames,
  this.includeLocalParticipant = true,

  this.startChatCentered = false,
  this.initialMessage,
  this.onMessageSent,
  this.controller,

  this.messageHeaderBuilder,
  this.waitingForParticipantsBuilder,
  this.attachmentBuilder,
  this.onAttachmentOpen,
  this.onAttachmentRemoved,
  this.fileInThreadBuilder,
  this.chatInputBoxBuilder,
  this.customInputBuilder,
  this.openFile,
  this.fileDropOverlayBuilder,
  this.toolsBuilder,
  this.inputPlaceholder,
  this.emptyStateTitle,
  this.emptyStateDescription,
  this.emptyState,

  this.agentName,
  this.onVisibleMessagesEmpty,
  this.initialShowCompletedToolCalls = false,
  this.shouldShowAuthorNames = true,
  this.showUsageFooter = false,
  this.inputContextMenuBuilder,
  this.inputOnPressedOutside,
  this.mobileStorageSaveSurfacePresenter,
  this.mobileUnderHeaderContentPadding,
});