ChannelUserMuteRequest constructor Null safety

ChannelUserMuteRequest(
  1. {required String targetId,
  2. required ChannelType channelType,
  3. required String channelUrl,
  4. String? description,
  5. int seconds = -1}
)

Implementation

ChannelUserMuteRequest({
  required String targetId,
  required ChannelType channelType,
  required String channelUrl,
  String? description,
  int seconds = -1,
}) : super() {
  url = '${channelType.urlString}/$channelUrl/mute';
  body = {
    'user_id': targetId,
    'seconds': seconds,
    if (description != null) 'description': description,
  };
}