toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  // logger.e("properties: ${properties![0].toJson()}");

  final Map<String, dynamic> data = <String, dynamic>{};
  data['type'] = type;
  data['id'] = id;
  if (properties != null) {
    data['props'] = properties![0].toJson();
    data['props_2'] = properties![1].toJson();
    data['props_3'] = properties![2].toJson();
  }
  if (widgets != null) {
    data['widgets'] = widgets!.map((v) => v.toJson()).toList();
  }
  return data;
}