ImageMessage.from constructor

ImageMessage.from({
  1. String? path,
  2. Uint8List? binaryData,
  3. String? url,
  4. String? format,
  5. String? name,
})

To create a new ImageMessage from path or binaryData or url.

path is for the local path of the local image file. binaryData is for the binary data of the local image file. url is for the URL of the remote image file. format is for the FileMessage.format, it is optional. name is optional, if provide, the FileMessage.url will has a name suffix.

Important: You must provide only one of parameters in path, binaryData and url.

Implementation

ImageMessage.from({
  String? path,
  Uint8List? binaryData,
  String? url,
  String? format,
  String? name,
}) : super.from(
        path: path,
        binaryData: binaryData,
        url: url,
        format: format,
        name: name,
      );