Browse SDKs · Flutter
SDKsFlutter

Create an audio message

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

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

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