ToolCallCard class
A card that renders one tool/function call — name, status, arguments, and output — as a single transcript entry.
Tool text is sanitized before it reaches the screen. The card shows a Copy button when copyEnabled is true (the default), and a Cancel button while the call is queued or running if onCancel is set.
- Inheritance
-
- Object
- Widget
- StatefulWidget
- ToolCallCard
- Available extensions
Constructors
- ToolCallCard({Key? key, required ToolCallRecord record, bool copyEnabled = true, ToolCallCopyOptions copyOptions = const ToolCallCopyOptions(), void onCopy(ToolCallCopyResult result)?, VoidCallback? onCancel, int? width})
-
const
Properties
- copyEnabled → bool
-
Whether the card exposes copy UI and semantic copy.
final
- copyOptions → ToolCallCopyOptions
-
Clipboard/export options for copied tool-call summaries. Its
ToolCallCopyOptions.maxOutputLength also cuts the output shown on the
card.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
finalinherited
- onCancel → VoidCallback?
-
Called when the cancel action is invoked while the record is busy.
final
- onCopy → void Function(ToolCallCopyResult result)?
-
Called after a copy attempt completes.
final
- record → ToolCallRecord
-
Tool-call data to render.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- width → int?
-
Optional fixed width for the card content.
final
Methods
-
animate(
{Duration? duration, Curve? curve, Object? trigger, bool repeat = false}) → Animate -
Available on Widget, provided by the AnimateExtension extension
Starts an Animate chain over this widget.duration/curveapply to the whole chain. With notriggerit plays on mount; with a non-null trigger it rests on mount and replays whenever the token changes. -
createElement(
) → StatefulElement -
Creates the Element that will mount this widget into the tree.
inherited
-
createState(
) → State< ToolCallCard> -
Creates the mutable state for this widget at the current location in
the tree. Called exactly once per StatefulElement instance.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited