Repository navigation
Outline OutlineSectionDivider
A section's divider in the outline: a short coloured bar, the section title, a dashed rule and an optional menu button. It sits between the messages of a section.
import 'package:agent_kit/agent_kit.dart';
Section "Draft": the first section of the open chapter "Release notes". The gallery's OutlineList gives it the colour outlineColor(context, 1), and the menu button is present because the scene passes sectionActions.
| Parameter | Type | Notes |
|---|---|---|
section |
OutlineSection (required) |
Read: id, title. |
color |
Color (required) |
The colour of the short bar at the left. |
onMenu |
VoidCallback? |
Opens the host's menu. The "More" button is left out when it is null. |
- A 4 by 13 px bar in
color, then the section title (one line, ellipsised,typeScale.uiSmall,textPrimary), then a dashed rule that fills the remaining width, then the menu button. - The menu button (
outline-section-menu-<id>) appears only whenonMenuis not null.
colors.textPrimary (section title), colors.borderSubtle (dashed rule, through the private _DashedLinePainter: 4 px dashes every 7 px), typeScale.uiSmall (title), colors.iconTertiary (menu button, through OutlineMoreButton).
Does not read the size class. The title takes at most the space the dashed rule leaves; a long title is ellipsised.
- The title is a text node. The bar and the rule carry no semantics.
- The menu button is
OutlineMoreButton:Semantics(button: true, label: 'More')with anAppTooltiplabelled "More". - No reduced-motion handling in this file.
- Gallery scene: Outline (
GalleryScene.outline,OutlineScene). The dividers are the sections "Draft" and "Review" of "Release notes". - Golden:
apps/gallery/test/component_shots_test.dartwritesoutline_section_divider(index 0),_light.pngand_dark.png. The scene is ing_outline_1600_<theme>.pngandg_outline_390_<theme>.png. - Other tests,
packages/agent_kit/test/outline/outline_test.dart: "a contents section jump reveals its divider and names it"; "chapter and section menus list the host actions"; "without host actions there is no menu button".
Generated from docs/components/outline/OutlineSectionDivider.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