toJson method
Implementation
Map<String, dynamic> toJson() {
final json = _$OpenChannelCreateParamsToJson(this);
if (coverImage != null && coverImage!.hasBinary) {
json['cover_file'] = coverImage;
} else {
json['cover_url'] = coverImage?.fileUrl;
}
json.removeWhere((key, value) => value == null);
return json;
}