createSoundMessage method

  1. @override
Future<V2TimValueCallback<V2TimMsgCreateInfoResult>> createSoundMessage({
  1. required String soundPath,
  2. required int duration,
})
override

Implementation

@override
Future<V2TimValueCallback<V2TimMsgCreateInfoResult>> createSoundMessage({
  required String soundPath,
  required int duration,
}) async {
  Map<String, dynamic> param = {
    "soundPath": soundPath,
    "duration": duration,
  };
  var resp = V2TimValueCallback<V2TimMsgCreateInfoResult>.fromJson(
    formatJson(
      await _channel.invokeMethod(
        "createSoundMessage",
        buildMessageMangerParam(
          param,
        ),
      ),
    ),
  );
  log("createSoundMessage", param, resp.toLogString());
  return resp;
}