toJson method
Serialize to a JSON-encodable map, omitting absent members.
Implementation
Map<String, dynamic> toJson() => <String, dynamic>{
'question': question,
if (choice != null) 'choice': choice!,
if (ranking != null) 'ranking': ranking!,
if (scores != null) 'scores': scores!,
if (text != null) 'text': text!,
if (abstain != null) 'abstain': abstain!,
};