Repository navigation
Composer QuestionAnswerLines
The resolved question as it reads in the transcript: one line per question, with the answer or "Skipped". It also has the top-level function answerSummary.
import 'package:agent_kit/agent_kit.dart';
Answered: the resolved request, one line per question. Each line shows the question in muted text and the answer in bold.
| Parameter | Type | Notes |
|---|---|---|
question |
Question |
Required. The resolved request. Items with no answer show "Skipped", or "No answer" when the request is not answered (expired or cancelled). |
String? answerSummary(QuestionItem item, QuestionAnswer? answer) joins the chosen labels and the typed text with commas. It returns null for a skipped item or no answer, and 'None' when the answer has neither choices nor text.
BbTheme roles read in question_answered.dart:
-
muted(question text),ink(answer),faint(Skipped and No answer) typeScale.uiSmall-
colors.borderSubtle(the line divider)
Does not read the size class. The text size is 14 px on touch and 13 px otherwise (question_answered.dart:76).
- The whole list has the semantics label
Answered questions. - Each line has the semantics label
"<question text> <answer or No answer or Skipped>", and excludes its child semantics.
- Gallery scene: the Components scene (
apps/gallery/lib/src/components_scene.dart). Specimen: the answered-lines frame inComposerSpecimens(apps/gallery/lib/components/composer.dart). - Golden shot:
apps/gallery/test/component_shots_test.dartwritesquestion_answer_lines(QuestionAnswerLinesindex 0) toapps/gallery/test/goldens/shots/.scenes_golden_test.dartcovers the sheet ascomponents_1000_light.pngandcomponents_1000_dark.png. -
packages/agent_kit/test/composer/question_answered_test.dart: "one line per question: answer, skipped" and "answerSummary joins choices and typed text". -
packages/agent_kit/test/composer/question_golden_test.dart: the question goldens. -
packages/agent_kit/test/compositions/agent_chat_pane_test.dartmentions the lines.
Generated from docs/components/composer/QuestionAnswerLines.md. Edit the file there; changes made on the wiki are overwritten.
Guides
- Package layout and pinning
- agent_kit_core
- Backend mapping
- agent_kit and the gallery
- Icon and README assets
Component sheets
theme
status
transcript
- ActivityGroupView
- AssistantProse
- ChildQuestionRow
- CodeBlock
- DiffView
- ExecOutput
- FileEditRow
- PlanChecklist
- ReturnLine
- SystemLineView
- TranscriptList
- UserBubble
composer
chrome
context
history
outline
workspace
compositions
providers