toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final value = this.value;
  final synonyms = this.synonyms;
  return {
    'value': value,
    if (synonyms != null) 'synonyms': synonyms,
  };
}