Browse SDKs · Flutter
SDKsFlutter

Create a file message

Create a file message from a platform path with the OpenIM Flutter SDK.

Copy
final message = await OpenIM.iMManager.messageManager.createFileMessage(
  filePath: filePath,
  fileName: fileName,
);

The path must be readable, and the file name is displayed to recipients. The Future creates an object waiting to be sent.