GenUiInspector class
A debug panel over a running generative interface.
Wrap it around whatever renders the surfaces and it draws a handle in the corner. Open it and you see, while you use the app: the component tree the model built, every data model path and what reads it, what a screen reader would announce, and the messages that got the screen into this state.
GenUiInspector(
controller: controller,
recorder: recorder,
child: GenUiConversation(...),
)
It is compiled out of a release build by default: enabled defaults to kDebugMode, and when it is false the child is returned untouched.
The panel excludes itself from semantics, so what the Semantics tab reports is the app's own tree and nothing a screen reader hears comes from the inspector.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- GenUiInspector
Constructors
- GenUiInspector({Key? key, required SurfaceController controller, required Widget child, GenUiTraceRecorder? recorder, bool enabled = kDebugMode, bool open = false})
-
Creates an inspector over
child.const
Properties
- child → Widget
-
The app, rendered under the panel.
final
- controller → SurfaceController
-
The controller whose surfaces the panel reports on.
final
- enabled → bool
-
Whether to show the panel at all.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- open → bool
-
Whether the panel starts open.
final
- recorder → GenUiTraceRecorder?
-
A recorder on the same controller, for the Messages tab.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< GenUiInspector> -
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