ChatMessage constructor

ChatMessage({
  1. required String id,
  2. required String content,
  3. required String role,
  4. required DateTime timestamp,
  5. bool isLoading = false,
  6. String? imageUrl,
  7. Uint8List? imageBytes,
  8. String? fileName,
  9. List<QuickReplyButton> quickReplies = const [],
  10. MessageType type = MessageType.text,
  11. bool isThinking = false,
  12. String? thinkingStatus,
  13. bool isStreaming = false,
  14. Map<String, dynamic>? uiComponentData,
  15. String? audioPath,
  16. int? audioDuration,
  17. String? userSelection,
  18. int? messageIndex,
})

Implementation

ChatMessage({
  required this.id,
  required this.content,
  required this.role,
  required this.timestamp,
  this.isLoading = false,
  this.imageUrl,
  this.imageBytes,
  this.fileName,
  this.quickReplies = const [],
  this.type = MessageType.text,
  this.isThinking = false,
  this.thinkingStatus,
  this.isStreaming = false,
  this.uiComponentData,
  this.audioPath,
  this.audioDuration,
  this.userSelection,
  this.messageIndex,
});