toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['parent_id'] = parentId;
  data['name'] = name;
  if (locations != null) {
    data['locations'] = locations!.map((v) => v.toJson()).toList();
  }
  if (methods != null) {
    data['methods'] = methods!.toJson();
  }
  return data;
}