toJson method
Implementation
Object toJson () {
final json = {
'name': label,
'moderated': moderated,
};
if (emoji is EmojiBuilder && emoji!.emoji.label.isNotEmpty) {
json.putIfAbsent('emoji_name', () => emoji!.emoji.label);
}
if (emoji is EmojiBuilder && emoji!.emoji.id.isNotEmpty) {
json.putIfAbsent('emoji_id', () => emoji!.emoji.id);
}
return json;
}