modes property
Specifies one or more preferred modes of transit. This parameter may only be specified for transit directions. The parameter supports the following arguments:
busindicates that the calculated route should prefer travel by bus.subwayindicates that the calculated route should prefer travel by subway.trainindicates that the calculated route should prefer travel by train.tramindicates that the calculated route should prefer travel by tram and light rail.railindicates that the calculated route should prefer travel by train, tram, light rail, and subway. This is equivalent totransitMode=train|tram|subway.
Implementation
final List<TransitMode>? modes;