toJson method Null safety

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  Map<String, dynamic> map = {};

  if (eLocation != null) {
    map["eLocation"] = eLocation!.toJson();
  }
  if (suggestedSearch != null) {
    map["suggestedSearch"] = suggestedSearch!.toJson();
  }

  return map;
}