tripsByRouteShortName method

List<PTTrip> tripsByRouteShortName(
  1. String routeShortName
)

Filters the trips by route short name and returns a list of trips that match the specified route short name.

Parameters

  • IN routeShortName The short name of the route to filter by.

Returns

A list of PTTrip objects that match the specified route short name.

Implementation

List<PTTrip> tripsByRouteShortName(String routeShortName) => _trips
    .where(
      (PTTrip trip) =>
          trip.route.routeShortName != null &&
          trip.route.routeShortName == routeShortName,
    )
    .toList();