sendCommand method

  1. @override
Future<String> sendCommand(
  1. String receiverId,
  2. String strCmd
)

Send custom commands or data to other users in the current session. Limit: up to 60 custom commands per second.
receiverId userId of the user who receives the command.
strCmd the custom commands or data, represented in string format.
Return ZoomVideoSDKError_Success if the function succeeds. Otherwise, this function returns an error.

Implementation

@override
Future<String> sendCommand(String receiverId, String strCmd) async {
  var params = <String, dynamic>{};
  params.putIfAbsent("receiverId", () => receiverId);
  params.putIfAbsent("strCmd", () => strCmd);

  return await methodChannel
      .invokeMethod<String>('sendCommand', params)
      .then<String>((String? value) => value ?? "");
}