ChannelUserBanRequest constructor Null safety

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

Implementation

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