toMap method Null safety

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

Implementation

@override
Map<String, Object?> toMap() {
  return {
    'key': this.key,
    'location': this.location?.toMap(),
    'uid': this.uid,
    'city': this.city,
    'district': this.district,
    'tag': this.tag,
    'address': this.address,
    'children': this.children?.map((c) => c.toMap()).toList()
  };
}