toMap method Null safety

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

Implementation

@override
Map<String, Object?> toMap() {
  return {
    'name': this.name,
    'uid': this.uid,
    'indoorID': this.indoorID,
    'floor': this.floor,
    'address': this.address,
    'city': this.city,
    'phone': this.phone,
    'pt': this.pt?.toMap(),
    'tag': this.tag,
    'price': this.price,
    'starLevel': this.starLevel,
    'grouponFlag': this.grouponFlag,
    'takeoutFlag': this.takeoutFlag,
    'waitedFlag': this.waitedFlag,
    'grouponNum': this.grouponNum,
    'discount': this.discount
  };
}