sendVoiceMessage method

Future<void> sendVoiceMessage(
  1. String path,
  2. int duration,
  3. String? displayName
)

Implementation

Future<void> sendVoiceMessage(
    String path, int duration, String? displayName) async {
  if (await createThreadIfNotExits() == false) return;
  final message = Message.createVoiceSendMessage(
    targetId: thread!.threadId,
    filePath: path,
    duration: duration,
    displayName: displayName,
  );
  sendMessage(message);
}