ChatMessage constructor

const ChatMessage({
  1. required String id,
  2. required String content,
  3. required bool isUser,
  4. required DateTime timestamp,
})

Creates a new chat message.

All parameters are required:

  • id: Unique identifier for the message
  • content: The text content of the message
  • isUser: Whether the message is from the user (true) or AI (false)
  • timestamp: When the message was sent

Implementation

const ChatMessage({
  required this.id,
  required this.content,
  required this.isUser,
  required this.timestamp,
});