toJson method
Implementation
Map<String, dynamic> toJson() {
final json = _$GroupChannelCreateParamsToJson(this);
if (coverImage != null && coverImage!.hasBinary) {
json['cover_file'] = coverImage;
} else {
json['cover_url'] = coverImage?.fileUrl;
}
if (json['is_public'] == false || json['is_public'] == null) {
json.remove('is_discoverable');
}
// Remove Unchanged Properties
json.removeWhere((key, value) => value == null);
return json;
}