toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() {
  Map<String, dynamic> jsonObject = {'mandatory': mandatory};
  if (valueType != null) {
    jsonObject['value_type'] = valueType;
  }
  if (display != null && display!.isNotEmpty) {
    var tmp = [];
    for (var d in display!) {
      tmp.add(d.toJson());
    }
    jsonObject['display'] = tmp;
  }
  return jsonObject;
}