PTTrip constructor

PTTrip({
  1. required PTRouteInfo route,
  2. required PTAgency agency,
  3. required int tripIndex,
  4. required DateTime? tripDate,
  5. required bool hasRealtime,
  6. required DateTime? departureTime,
  7. bool? isCancelled,
  8. int? delayMinutes,
  9. required List<PTStopTime> stopTimes,
  10. required int stopIndex,
  11. String? stopPlatformCode,
  12. required bool isWheelchairAccessible,
  13. required bool isBikeAllowed,
})

Create a PTTrip.

API users do not typically create instances of this class directly.

Parameters

  • route: (PTRouteInfo) The associated public route.
  • agency: (PTAgency) The operating agency.
  • tripIndex: (int) Internal trip index.
  • tripDate: (DateTime?) Trip date (UTC flag, local value).
  • hasRealtime: (bool) Whether realtime data is available.
  • departureTime: (DateTime?) Departure time (UTC flag, local value).
  • isCancelled: (bool?) Cancellation flag.
  • delayMinutes: (int?) Delay in minutes when realtime data applies.
  • stopTimes: (List<PTStopTime>) Stop times for the trip.
  • stopIndex: (int) Index of the current stop in the stopTimes list.
  • stopPlatformCode: (String?) Platform code for the stop.
  • isWheelchairAccessible: (bool) Wheelchair accessibility flag.
  • isBikeAllowed: (bool) Bike allowance flag.

Implementation

PTTrip({
  required this.route,
  required this.agency,
  required this.tripIndex,
  required this.tripDate,
  required this.hasRealtime,
  required this.departureTime,
  this.isCancelled,
  this.delayMinutes,
  required this.stopTimes,
  required this.stopIndex,
  this.stopPlatformCode,
  required this.isWheelchairAccessible,
  required this.isBikeAllowed,
});