toJson method
Implementation
Map<String, dynamic> toJson() {
var statusList = [];
if (scheduledStatus != null) {
for (final val in scheduledStatus!) {
statusList.add(val.toString().split('.').last);
}
}
final ret = <String, dynamic>{
'channel_url': channelUrl,
'status': statusList.isEmpty ? null : statusList,
'message_type': messageTypeFilter?.toString().split('.').last,
};
ret.removeWhere((key, value) => value == null);
return ret;
}