SymbolPanel class
Spec 09b D7: the Symbols tab.
- Loading: a progress indicator and "Loading symbols…".
- Failed: the error's message and a Retry button (key
symbol-retry) calling SymbolLibraryLoader.retry. - Ready: the search field (key
symbol-search, hint "Search symbols", a clear button keyedsymbol-search-clearwhile it is not empty), then theSymbolGalleryover searchSymbols. An empty result showsNo symbols match "<query>"(keysymbol-search-empty) and a Clear button (keysymbol-search-clear-empty); with no query (a filter offering nothing), an empty area.
The field's focus follows the page panel's pattern (F-4, F-13):
ShellShortcutGuard › CallbackShortcuts(Escape → handBack) › TextField( focusNode: searchFocus, onEditingComplete: handBack, onTapOutside: handBack). The guard keeps the shell's letters out of the field; the
nearer Escape binding hands the focus back to the canvas, which the
guard alone would not.
The highlight (the gallery's selectedId) is the armed entry's id
while tool is the active tool of tools, null otherwise: the panel
listens to tools and to armed.
Enabled only when permissions allow every capability of kSymbolPlacementNeeds.
The search text is query's (spec 09c D13): the caller's, which outlives the panel -- the shell removes the panel on its Tools tab -- so the text survives a tab switch. The panel listens to it while mounted and never disposes it.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- SymbolPanel
Constructors
-
SymbolPanel({Key? key, required SymbolLibraryLoader loader, required SymbolThumbnails thumbnails, required ToolController tools, required SymbolPlaceTool tool, required ValueNotifier<
SymbolEntry?> armed, required DraftPermissions permissions, required PanelFieldFocusNode searchFocus, required TextEditingController query, required void onSelect(SymbolEntry entry), TextMeasurer measurer = const InsertionPointMeasurer(), bool filter(SymbolEntry entry)?, bool placeable = true, Listenable? toolChanges}) -
const
Properties
-
armed
→ ValueNotifier<
SymbolEntry?> -
final
- filter → bool Function(SymbolEntry entry)?
-
The symbols offered (host embedding API spec C-5's
symbolFilter): applied before the search, and to a tapped cell's entry; null offers every symbol. Read at each build.final - hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- loader → SymbolLibraryLoader
-
final
- measurer → TextMeasurer
-
The thumbnail documents' measurer. A symbol holds no text, so the
default (no font stack) paints the same thumbnail as any other.
final
- onSelect → void Function(SymbolEntry entry)
-
A cell tap, with its entry. The shell arms the tool and activates it.
final
- permissions → DraftPermissions
-
final
- placeable → bool
-
Whether a placement is offered at all (spec C-5: the symbol tool is
among the host's tools): false disables the gallery, as a denied
permission does.
final
- query → TextEditingController
-
The search field's text (spec 09c D13): the caller's, never disposed
here.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchFocus → PanelFieldFocusNode
-
final
- thumbnails → SymbolThumbnails
-
final
- tool → SymbolPlaceTool
-
final
- toolChanges → Listenable?
-
What the panel rebuilds on for the active tool: tools when null. The
shell passes a relay of it that holds a notification sent during a
build until after the frame (Task 4 review R-2).
final
- tools → ToolController
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< SymbolPanel> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited