journey
A trip's legs: where from, where to, when, and what changed.
A trip, leg by leg. journey draws a card for each leg of a flight, a train, a coach or a transfer: who runs it, how it stands, its two ends across a line, and up to three facts such as the gate and the seat.
Drawn live in your browser with the SDK’s own sizes and colours, not a screenshot.
Rendered natively by the Flutter SDK since 0.101.0 and the web SDK since 0.76.0. A build that does not declare it is never offered it.
time_label is the local time at that stop as your action returned it, written out. was_label is the time it was planned for; it is drawn struck through beside the new one. change_after on a leg is the wait before the next leg, drawn between the two cards.
When not to use it
An agenda or a day's plan is a timeline. The state of an order or a claim is an order_tracker. A ticket to show at the gate is a pass.
Props
Every block also carries type and a required fallback_text of 1 to 300 characters.
| Prop | Type | Required | Constraints |
|---|---|---|---|
title | string | No | Up to 80 characters. |
legs | array | Yes | 1 to 4 entries. |
legs[].carrier | string | No | Up to 60 characters. |
legs[].from | object | Yes | None |
legs[].from.place | string | Yes | 1 to 60 characters. |
legs[].from.code | string | No | Up to 8 characters. |
legs[].from.time_label | string | Yes | 1 to 24 characters. |
legs[].from.was_label | string | No | Up to 24 characters. |
legs[].to | object | Yes | None |
legs[].to.place | string | Yes | 1 to 60 characters. |
legs[].to.code | string | No | Up to 8 characters. |
legs[].to.time_label | string | Yes | 1 to 24 characters. |
legs[].to.was_label | string | No | Up to 24 characters. |
legs[].duration_label | string | No | Up to 24 characters. |
legs[].status | object | No | None |
legs[].status.label | string | Yes | 1 to 30 characters. |
legs[].status.tone | success | warning | error | neutral | No | None |
legs[].facts | array | No | Up to 3 entries. |
legs[].facts[].label | string | Yes | 1 to 20 characters. |
legs[].facts[].value | string | Yes | 1 to 24 characters. |
legs[].change_after | object | No | None |
legs[].change_after.label | string | Yes | 1 to 60 characters. |
legs[].change_after.tone | success | warning | error | neutral | No | None |
On the wire
{
"id": "blk_94",
"type": "journey",
"fallback_text": "AE 417 from Istanbul to Frankfurt now leaves at 14:55, 35 minutes late, and lands at 16:05.",
"props": {
"legs": [
{
"carrier": "AE 417 · Aerlune",
"from": { "place": "Istanbul", "code": "IST", "time_label": "14:55", "was_label": "14:20" },
"to": { "place": "Frankfurt", "code": "FRA", "time_label": "16:05", "was_label": "15:30" },
"duration_label": "3 h 10 min",
"status": { "label": "35 min late", "tone": "warning" },
"facts": [
{ "label": "Terminal", "value": "1" },
{ "label": "Gate", "value": "B14" },
{ "label": "Seat", "value": "14C" }
]
}
]
}
}Interaction
Nothing on a leg is pressed; it is read. A stop with no code shows its place in the code's position. change_after on the last leg is not drawn.