Skip to content

FlowMessageActions is the muted icon row that lives under an assistant turn. The five shipped actions come as named constructors — .copy, .regenerate, .edit, .thumbUp, .thumbDown — each carrying its tooltip and callback, and the default constructor takes any icon for actions of your own. The row lays them out at the design’s rhythm and reports the taps; what they do is entirely the host’s business.

An action without an onPressed renders muted and disabled. The thumbs carry a selected flag — making them exclusive is host state, not widget behavior:

Copy, regenerate, edit, feedback
FlowMessageActions(
actions: [
FlowMessageAction.copy(tooltip: 'Copy', onPressed: () {}),
FlowMessageAction.regenerate(tooltip: 'Regenerate', onPressed: () {}),
FlowMessageAction.edit(tooltip: 'Edit'), // no onPressed → disabled
FlowMessageAction.thumbUp(
tooltip: 'Good response',
selected: liked,
onPressed: toggleLike,
),
FlowMessageAction.thumbDown(
tooltip: 'Bad response',
selected: disliked,
onPressed: toggleDislike,
),
],
)

FlowMessage takes the row in its footer: slot, placing it under the content at the design’s spacing:

The footer slot
FlowMessage(
message,
footer: FlowMessageActions(
actions: [
FlowMessageAction.copy(tooltip: 'Copy', onPressed: () {}),
FlowMessageAction.regenerate(tooltip: 'Regenerate', onPressed: () {}),
],
),
)
  • FlowMessageAction.copy / .regenerate / .edit / .thumbUp / .thumbDown — the shipped actions; every one takes tooltip, onPressed, and selected where it applies.
  • FlowMessageAction(icon: …) — a custom action (share, retry, bookmark): your icon, an optional selectedIcon, and the same tooltip / onPressed / selected.
  • No onPressed → the action renders muted and ignores taps.
  • Tooltips are host-supplied strings — the package ships no copy, so localization stays yours.