DefaultPublicTransportBriefRouteViewModel
Default implementation of PublicTransportBriefRouteViewModel.
Extracts route information from TrafficRoute and provides it in a format suitable for the brief route card UI.
Parameters
The traffic route containing public transport information.
Timezone of the destination point, used for displaying arrival time. Defaults to TimeZone.getDefault (device's current timezone). For cross-timezone routes, callers should provide the destination's timezone.
Optional provider for fetching schedule information. When provided, enables async schedule loading.
Callback invoked when the route card is clicked.
Callback invoked when the route action button is clicked.
Constructors
Properties
Current expansion state of the route card. When true, the card displays detailed information (e.g., full schedule, transfer details). When false, only brief summary is shown (e.g., total duration, arrival time, total fare).
Ordered list of route segments that together form the complete journey. Each element represents a contiguous part of the route between two points. The sequence follows chronological order from departure to arrival.
Schedule groups for the first public transport segment.
Total travel duration from start to end of the route. Excludes waiting times and transfer times.