Browse SDKs · Flutter
SDKsFlutter

Create a file message from a local path

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

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

The absolute path must be readable. The Future creates an object waiting to be sent.