legs property

List<Leg>? legs
final

The legs of the trip.

When you calculate travel duration and distance from a set origin, legs contains a single leg containing the duration and distance from the origin to the destination. When you do a search along route, legs contains two legs: one from the origin to place, and one from the place to the destination.

Implementation

final List<Leg>? legs;