Browse SDKs · Flutter
SDKsFlutter

Create an audio message from a local path

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

Copy
final message = await OpenIM.iMManager.messageManager
    .createSoundMessageFromFullPath(
  soundPath: absolutePath,
  duration: durationSeconds,
);

The path must be readable, and duration is measured in seconds. The Future creates an object waiting to be sent.