muteUser method Null safety

Future<void> muteUser(
  1. {required String userId,
  2. int seconds = -1,
  3. String? description}
)

Mutes a user from this channel.

Provides seconds to set how long the user should be muted. -1 indicates to mute the user parmanently.

Implementation

Future<void> muteUser({
  required String userId,
  int seconds = -1,
  String? description,
}) async {
  if (userId.isEmpty) {
    throw InvalidParameterError();
  }

  await _sdk.api.send(ChannelUserMuteRequest(
    targetId: userId,
    channelType: channelType,
    channelUrl: channelUrl,
    description: description,
    seconds: seconds,
  ));
}