copyWith method

Message copyWith({
  1. String? text,
  2. bool? isUser,
  3. Uint8List? imageBytes,
  4. MessageType? type,
  5. String? toolName,
})

Implementation

Message copyWith({
  String? text,
  bool? isUser,
  Uint8List? imageBytes,
  MessageType? type,
  String? toolName,
}) {
  return Message(
    text: text ?? this.text,
    isUser: isUser ?? this.isUser,
    imageBytes: imageBytes ?? this.imageBytes,
    type: type ?? this.type,
    toolName: toolName ?? this.toolName,
  );
}