toMap method Null safety

  1. @override
Map<String, Object?> toMap()

Implementation

@override
Map<String, Object?> toMap() {
  return {
    'location': this.location?.toMap(),
    'address': this.address,
    'businessCircle': this.businessCircle,
    'addressDetail': this.addressDetail?.toMap(),
    'confidence': this.confidence,
    'poiList': this.poiList?.map((p) => p.toMap()).toList(),
    'poiRegions': this.poiRegions?.map((p) => p.toMap()).toList(),
    'sematicDescription': this.sematicDescription
  };
}