toMap method

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

model -> map

Implementation

@override
Map<String, Object?> toMap() {
  return Map.from(super.toMap())
    ..addAll({
      '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()
    });
}