ReferenceComponents

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.

AE 417 · Aerlune35 min lateIST14:55 14:20Istanbul3 h 10 minFRA16:05Frankfurt
Terminal1GateB14Seat14C

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.

PropTypeRequiredConstraints
titlestringNoUp to 80 characters.
legsarrayYes1 to 4 entries.
legs[].carrierstringNoUp to 60 characters.
legs[].fromobjectYesNone
legs[].from.placestringYes1 to 60 characters.
legs[].from.codestringNoUp to 8 characters.
legs[].from.time_labelstringYes1 to 24 characters.
legs[].from.was_labelstringNoUp to 24 characters.
legs[].toobjectYesNone
legs[].to.placestringYes1 to 60 characters.
legs[].to.codestringNoUp to 8 characters.
legs[].to.time_labelstringYes1 to 24 characters.
legs[].to.was_labelstringNoUp to 24 characters.
legs[].duration_labelstringNoUp to 24 characters.
legs[].statusobjectNoNone
legs[].status.labelstringYes1 to 30 characters.
legs[].status.tonesuccess | warning | error | neutralNoNone
legs[].factsarrayNoUp to 3 entries.
legs[].facts[].labelstringYes1 to 20 characters.
legs[].facts[].valuestringYes1 to 24 characters.
legs[].change_afterobjectNoNone
legs[].change_after.labelstringYes1 to 60 characters.
legs[].change_after.tonesuccess | warning | error | neutralNoNone

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.