tripsByAgency method
- PTAgency agency
Filter trips by agency.
Parameters
agency: (PTAgency) Agency to filter by.
Returns
- (
List<PTTrip>) Trips operated by the providedagency. 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();