ChannelReportRequest constructor Null safety

ChannelReportRequest(
  1. {required ChannelType channelType,
  2. required String channelUrl,
  3. required ReportCategory category,
  4. String? description}
)

Implementation

ChannelReportRequest({
  required ChannelType channelType,
  required String channelUrl,
  required ReportCategory category,
  String? description,
}) : super() {
  url = 'report/${channelType.urlString}/$channelUrl';
  body = {
    'reporting_user_id': state.userId,
    'report_category': category.asString(),
    if (description != null) 'report_description': description
  };
}