toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{
'id': id,
'type': type.value.name,
'title': title.value,
'description': description.value,
'properties': properties.value,
};
if (trueConnection != null) {
json['true_statement'] = trueConnection!.toJson();
}
if (falseConnection != null) {
json['false_statement'] = falseConnection!.toJson();
}
if (nextConnection != null) {
json['next'] = nextConnection!.toJson();
}
return json;
}