Message.withImages constructor

Message.withImages({
  1. required String text,
  2. required List<Uint8List> imageBytes,
  3. bool isUser = false,
})

Implementation

factory Message.withImages({
  required String text,
  required List<Uint8List> imageBytes,
  bool isUser = false,
}) {
  return Message(
    text: text,
    imageBytes: imageBytes.isNotEmpty ? imageBytes.first : null,
    images: List<Uint8List>.from(imageBytes),
    isUser: isUser,
  );
}