BaseSchematicViewerState<T extends StatefulWidget> class abstract

Base state class for schematic viewer pages. Contains common logic for layout computation, node toggling, and rendering.

Inheritance

Constructors

BaseSchematicViewerState()

Properties

availableSourceFormats AvailableSourceFormats?
Discovers which source formats are navigable for the current module. Uses cached module info (synchronous).
no setter
context BuildContext
The location in the tree where this widget builds.
no setterinherited
crossProbeService CrossProbeService?
Optional CrossProbeService for cross-probing between viewers.
no setter
error String?
Current error message, if any.
getter/setter pair
externalHierarchy HierarchyService?
External hierarchy service from the parent application. Override in subclass to provide access to the widget's externalHierarchy. Returns null by default (no external hierarchy).
no setter
fileName String?
Current file name.
getter/setter pair
focusPortId String?
Port ID to focus on after incremental expansion/collapse. When set, the canvas pans to keep this port centred at the current zoom level instead of fitting the whole node.
getter/setter pair
hasExternalSignalListeners bool
Whether external widgets are listening for signals.
no setter
hashCode int
The hash code for this object.
no setterinherited
incomingSignalPaths ValueNotifier<List<String>?>?
Notifier for incoming signal paths from other viewers (cross-probing).
no setter
isLoading bool
Loading state.
getter/setter pair
isToggling bool
Toggling state.
getter/setter pair
layout SchematicLayoutResult?
Current schematic layout result.
getter/setter pair
layoutEngine SchematicLayoutEngine?
Protected access to the layout engine for subclasses.
no setter
mounted bool
Whether this State object is currently in a tree.
no setterinherited
onGoToSource GoToSourceCallback?
Optional callback to navigate to a signal's source for a chosen RohdSourceFormat.
no setter
onSendSignals → void Function(List<String> signalPaths)?
Optional callback to send selected signals to other viewers.
no setter
pendingToggleNodeId String?
Pending node ID for toggle operation.
getter/setter pair
recentlyToggledNodeId String?
Recently toggled node ID for visual feedback.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schematicAdapter NetlistSchematicAdapter?
Dart schematic adapter (owns the graph in Dart). Handles parsing and toggle operations.
getter/setter pair
schematicJson String?
Current schematic JSON data.
getter/setter pair
sessionId String
Protected access to the session ID for subclasses.
no setter
signalValueLookup → ({bool computed, String signalId, String value})? Function(String wireName)?
Optional callback to look up a signal's value by wire name.
no setter
togglingLabel String
Label shown in the busy overlay (e.g. 'Expanding...' or 'Collapsing...').
getter/setter pair
widget → T
The current configuration.
no setterinherited

Methods

activate() → void
Called when this object is reinserted into the tree after having been removed via deactivate.
inherited
build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
inherited
buildAppBar({required BuildContext context, bool showFileNameBadge = false, bool showStats = false, bool showFilePicker = false, bool showReload = true, PreferredSizeWidget? bottom, bool? appBarPinned, ValueChanged<bool>? onAppBarPinnedChanged}) PreferredSizeWidget
Build a standard AppBar with configurable components.
buildEmptyState({required String title, required String subtitle, Widget? action}) Widget
Build empty state display.
buildErrorDisplay() Widget
Build standard error display.
buildLoadingIndicator({String message = 'Loading schematic...'}) Widget
Build standard loading indicator.
buildSchematicCanvas({Color? backgroundColor, Key? canvasKey}) Widget
Build the schematic canvas with theme support.
computeLayout(String jsonData, {bool expandAll = false, SchematicExpansionMode? expansionMode}) Future<void>
Compute layout from JSON data.
createLayoutEngine() SchematicLayoutEngine
Creates the engine used to compute ELK layouts.
deactivate() → void
Called when this object is removed from the tree.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
didChangeDependencies() → void
Called when a dependency of this State object changes.
inherited
didUpdateWidget(covariant T oldWidget) → void
Called whenever the widget configuration changes.
inherited
dispose() → void
Called when this object is removed from the tree permanently.
override
ensureConnectivity(String nodeId) Future<bool>
Called before graph mutations that require wire connectivity (node toggle, port expand, wire expand). Override to fetch connectivity data and rebuild the adapter. Returns true if the adapter was rebuilt.
handleCollapsePartial(String nodeId) Future<SchematicLayoutResult?>
Handle collapsing a partially expanded node back to fully collapsed.
handleConvertToBlocksOnly(String nodeId) Future<SchematicLayoutResult?>
Handle "convert to blocks-only" button click on a fully expanded node.
handleConvertToBlocksOnlyRecursive(String nodeId) Future<SchematicLayoutResult?>
Recursive version of handleConvertToBlocksOnly (Shift+click).
handleExpandChild(String nodeId, String childName) Future<SchematicLayoutResult?>
Handle expanding a specific child by name for search navigation.
handleExpandNonPrimitives(String nodeId) Future<SchematicLayoutResult?>
Handle "expand non-primitives" button click.
handleExpandNonPrimitivesRecursive(String nodeId) Future<SchematicLayoutResult?>
Recursive version of handleExpandNonPrimitives (Shift+click).
handleExpandPath(List<String> pathSegments, {String? targetWireName}) Future<SchematicLayoutResult?>
Batch-expand an entire hierarchy path in a single layout cycle.
handleExpandWire(String nodeId, String wireName) Future<SchematicLayoutResult?>
Handle expanding a node to reveal a specific wire (hyperedge) by name.
handleNodeToggle(String nodeId) Future<SchematicLayoutResult?>
Handle node toggle (expand/collapse).
handleNodeToggleRecursive(String nodeId) Future<SchematicLayoutResult?>
Recursive version of handleNodeToggle (Shift+click).
handlePortCollapse(String nodeId, String portId) Future<SchematicLayoutResult?>
Handle port collapse (click on a boundary port with a visible wire).
handlePortCollapseThrough(String nodeId, String portId) Future<SchematicLayoutResult?>
Handle recursive port collapse (Shift+click on a boundary port).
handlePortExpand(String nodeId, String portId) Future<SchematicLayoutResult?>
Handle incremental port expansion.
handlePortExpandThrough(String nodeId, String portId) Future<SchematicLayoutResult?>
Handle incremental port expansion with pass-through traversal.
handleReload() → void
Handle reload button press.
initState() → void
Called when this object is inserted into the tree.
override
loadInitialSchematic() → void
Override this to load the initial schematic. Called automatically in initState().
loadSchematicFromAsset(String assetPath, {String? displayName}) Future<void>
Load schematic from asset bundle.
loadSchematicFromFile() Future<void>
Load schematic from file picker.
needsConnectivity(String nodeId) bool
Hook for subclasses that support incremental loading.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
platformIcon(IconData nativeIcon, String emoji, {double? size, Color? color}) Widget
Returns an icon for cross-platform display. Uses emoji if fonts are available, native Flutter icons otherwise. On Linux, checks for actual emoji font availability. On other platforms, uses emoji with ASCII fallback in tooltip.
reassemble() → void
Called whenever the application is reassembled during debugging, for example during hot reload.
inherited
setFileName(String? name) → void
Set file name.
setLayout(SchematicLayoutResult newLayout) → void
Set the schematic layout directly (e.g., from synthesized data).
setLoading({required bool loading, String? errorMessage}) → void
Set loading state and optional error message.
setState(VoidCallback fn) → void
Notify the framework that the internal state of this object has changed.
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
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

hasEmojiFonts() bool
Check if an emoji font is available on the system.

Constants

emojiFallbacks → const Map<String, String>
Map of emoji to ASCII fallback symbols for when emojis aren't available.