toJson method
Generates a map representing the InteractiveMessage
.
Implementation
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> map = super.toJson();
map[ModelFieldConstants.title] = title;
map[ModelFieldConstants.submitElement] = submitElement.toMap();
map[ModelFieldConstants.formFields] =
formFields.map((e) => e.toMap()).toList();
if (goalCompletionText != null) {
map[ModelFieldConstants.goalCompletionText] = goalCompletionText;
}
return map;
}