downloadAttachment method Null safety

Future<NIMResult<void>> downloadAttachment(
  1. {required NIMMessage message,
  2. required bool thumb}
)

In normal cases, once a message is received, its attachment will be downloaded automatically. If the download fails, you can call this API to download again. message: the message that contains the attachment, thumb: (only valid for image messages and video messages) download the thumbnail or the original file; if you pass in true, the thumbnail will be downloaded.

Implementation

Future<NIMResult<void>> downloadAttachment(
    {required NIMMessage message, required bool thumb}) async {
  return _platform.downloadAttachment(message: message, thumb: thumb);
}