EmbeddedSchematicViewer class

Embedded schematic viewer that loads from a bundled asset or provided JSON. No AppBar, no Scaffold - just the schematic canvas for embedding.

Use this widget when you need to embed a schematic viewer in a larger UI (e.g., in DevTools tabs, embedded panels, etc.).

When externalHierarchy is provided, the schematic viewer will use the shared hierarchy from the parent application instead of loading its own. This enables synchronized selection across different viewers.

Inheritance

Constructors

EmbeddedSchematicViewer({Key? key, String? assetPath, String? schematicJson, Map<String, dynamic>? netlistJsonMap, SchematicThemeMode? initialThemeMode, HierarchyService? externalHierarchy, ValueChanged<HierarchyOccurrence?>? onModuleSelected, HierarchyOccurrence? selectedModule, bool isVisible = true, ({bool computed, String signalId, String value})? signalValueLookupFn(String wireName)?, Future<Map<String, dynamic>?> fetchModuleNetlist(String definitionName)?, ValueChanged<Map<String, dynamic>>? onNetlistEnriched, void onSendSignals(List<String> signalPaths)?, bool hasExternalSignalListeners = false, GoToSourceCallback? onGoToSourceCallback, ValueNotifier<List<String>?>? incomingSignalPaths, CrossProbeService? crossProbeService, RohdExtensionClient? extensionClient, SchematicExpansionMode initialExpansionMode = SchematicExpansionMode.defaultView})
Constructor for EmbeddedSchematicViewer.
const

Properties

assetPath String?
Asset path to load the schematic from. Ignored if schematicJson or netlistJsonMap is provided.
final
crossProbeService CrossProbeService?
Optional CrossProbeService for cross-probing between viewers.
final
extensionClient RohdExtensionClient?
Optional ROHD extension client for handshaking.
final
externalHierarchy HierarchyService?
External hierarchy service from the parent application. When provided, the schematic viewer uses this instead of loading its own. This enables shared state across DevTools, Wave Viewer, and Schematic.
final
fetchModuleNetlist Future<Map<String, dynamic>?> Function(String definitionName)?
Optional callback to fetch full schematic data for a single module.
final
hasExternalSignalListeners bool
Whether external widgets (e.g. waveform viewer) are listening for signals. When false, the "Send Signals" context-menu item is hidden. Defaults to false (most embeddings don't have external listeners).
final
hashCode int
The hash code for this object.
no setterinherited
incomingSignalPaths ValueNotifier<List<String>?>?
Notifier for incoming signal paths from other viewers (cross-probing).
final
initialExpansionMode SchematicExpansionMode
Controls the initial expansion state after loading.
final
initialThemeMode SchematicThemeMode?
Initial theme mode for the schematic viewer. When provided, the embedded viewer will start with this theme mode.
final
isVisible bool
Whether the schematic tab is currently visible to the user. When false, expensive layout computations are deferred until visible. This prevents the schematic from blocking the UI when the waveform (or another tab) is active.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
netlistJsonMap Map<String, dynamic>?
Schematic JSON data as a Map (parsed from ROHD interface). Preferred over schematicJson when available. If provided, both schematicJson and assetPath are ignored.
final
onGoToSourceCallback GoToSourceCallback?
Callback when user wants to navigate to a signal's source for a chosen RohdSourceFormat.
final
onModuleSelected ValueChanged<HierarchyOccurrence?>?
Callback when a module is selected in the schematic. The parent can use this to sync selection with other viewers.
final
onNetlistEnriched ValueChanged<Map<String, dynamic>>?
Called after incremental module fetches enrich the netlist JSON.
final
onSendSignals → void Function(List<String> signalPaths)?
Callback when user wants to send selected signals to other viewers.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schematicJson String?
Schematic JSON data to render directly (as a JSON string). If provided, assetPath is ignored.
final
selectedModule HierarchyOccurrence?
The currently selected module from the parent application. When this changes, the schematic will update to show this module as root.
final
signalValueLookupFn → ({bool computed, String signalId, String value})? Function(String wireName)?
Optional callback to look up a signal's current value by wire name.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<EmbeddedSchematicViewer>
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.
override
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

Constants

defaultAssetPath → const String
Default asset path used when neither assetPath nor schematicJson is provided.