toMap method Null safety

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

Implementation

@override
Map<String, Object?> toMap() {
  return {
    'busLineName': this.busLineName,
    'busLineDirection': this.busLineDirection,
    'uid': this.uid,
    'startTime': this.startTime,
    'endTime': this.endTime,
    'isMonTicket': this.isMonTicket,
    'basicPrice': this.basicPrice,
    'totalPrice': this.totalPrice,
    'busStations': this.busStations?.map((e) => e.toMap()).toList(),
    'busSteps': this.busSteps?.map((e) => e.toMap()).toList()
  };
}