tripsByRouteType method

List<PTTrip> tripsByRouteType(
  1. PTRouteType routeType
)

Filters the trips by route type. Returns a list of trips that match the specified route type.

Parameter:

  • routeType: The type of the route to filter by.

Returns: A list of PTTrip objects that match the specified route type.

Implementation

List<PTTrip> tripsByRouteType(PTRouteType routeType) =>
    _trips.where((trip) => trip.route.routeType == routeType).toList();