toJson method
Implementation
@override
Map<String, dynamic> toJson() {
return {
...super.toJson(),
'type': ComponentType.channelSelectMenu.value,
'custom_id': _customId,
'channel_types': _channelTypes.isNotEmpty
? _channelTypes.map((e) => e.value).toList()
: null,
'default_values': _defaultChannels.isNotEmpty
? _defaultChannels
.map((e) => {'id': e.value, 'type': 'channel'})
.toList()
: null,
};
}