toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['text'] = text;
if (components != null) {
data['components'] = components!.map((v) => v.toJson()).toList();
}
data['type'] = type;
data['modifier'] = modifier;
return data;
}