tripsByAgency method

List<PTTrip> tripsByAgency(
  1. PTAgency agency
)

Filter trips by agency.

Parameters

  • agency: (PTAgency) Agency to filter by.

Returns

  • (List<PTTrip>) Trips operated by the provided agency. Returns an empty list if the agency is not present.

Implementation

List<PTTrip> tripsByAgency(PTAgency agency) =>
    _trips.where((PTTrip trip) => trip.agency.id == agency.id).toList();