image method

TextAi image(
  1. dynamic file
)

Add images to images list of the TextAi object.

@param file The file path of the image or a list of file paths. @return The TextAi object with the added images.

Implementation

TextAi image(dynamic file) {
  if (file is String) {
    images = [Message.image(file)];
  } else if (file is List<String>) {
    images = file.map((f) => Message.image(f)).toList();
  }
  return this;
}