ChatVoiceMessageBody constructor

ChatVoiceMessageBody({
  1. required String localPath,
  2. int duration = 0,
  3. String? displayName,
  4. int? fileSize,
})

Creates a voice message.

Param localPath The local path of the voice file.

Param displayName The name of the voice file.

Param fileSize The size of the voice file in bytes.

Param duration The voice duration in seconds.

Implementation

ChatVoiceMessageBody({
  required super.localPath,
  this.duration = 0,
  super.displayName,
  super.fileSize,
}) : super(
        type: MessageType.VOICE,
      );