SchematicPainter class
CustomPainter that draws the schematic.
- Inheritance
-
- Object
- Listenable
- CustomPainter
- SchematicPainter
Constructors
-
SchematicPainter({required SchematicLayoutResult layout, required ValueNotifier<
({Offset offset, double scale})> viewTransform, required ValueNotifier<bool> snapshotMode, required ValueNotifier<({bool isInterior, String? portId})> hoveredBoundaryPortNotifier, SchematicColorScheme colorScheme = SchematicColorScheme.defaultScheme, String? highlightedWireName, String? selectedEdgeScope, Set<String> selectedWireIds = const {}, Map<String, String?> selectedWireScopePaths = const {}, Set<String> selectedNodeIds = const {}, String? highlightedNodeId, String? pendingToggleNodeId, bool isNodeInScope(String? nodeId, String scopeId)?}) -
Constructor for
SchematicPainter.
Properties
- colorScheme → SchematicColorScheme
-
The color scheme to use for rendering.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- highlightedNodeId → String?
-
Node being highlighted (hovered or selected)
final
- highlightedWireName → String?
-
Name of wire to highlight (edges with this name)
final
-
hoveredBoundaryPortNotifier
→ ValueNotifier<
({bool isInterior, String? portId})> -
Notifier for the currently hovered boundary port. Updated by the
widget state's hover handler and merged into the
repaint:listenable so that hover-state changes triggerpaint()only — no widget rebuild.final - isNodeInScope → bool Function(String? nodeId, String scopeId)?
-
Callback to check if a node is in scope (provided by state)
final
- layout → SchematicLayoutResult
-
The schematic layout data to render.
final
- pendingToggleNodeId → String?
-
Node being toggled - show flipped +/-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedEdgeScope → String?
-
The nodeId scope of the selected wire
final
-
selectedNodeIds
→ Set<
String> -
Set of node/instance IDs currently selected (multi-select).
final
-
selectedWireIds
→ Set<
String> -
Set of wire IDs that are currently selected (multi-select).
final
-
selectedWireScopePaths
→ Map<
String, String?> -
Map from selected wire ID to its scope hierarchy path.
Used to disambiguate identically-named wires in multi-instance blocks.
final
- semanticsBuilder → SemanticsBuilderCallback?
-
Returns a function that builds semantic information for the picture drawn
by this painter.
no setterinherited
-
snapshotMode
→ ValueNotifier<
bool> -
When true, interactive-only decorations (expand/collapse icons) are
suppressed so they don't appear in PNG snapshots.
final
-
viewTransform
→ ValueNotifier<
({Offset offset, double scale})> -
View transform notifier (scale + offset) — updated directly by the
widget state during zoom/pan to avoid rebuilding the widget tree.
Passed as
repaint:to CustomPaint so changes trigger paint only.final
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be notified when it is time to repaint.
inherited
-
hitTest(
Offset position) → bool? -
Called whenever a hit test is being performed on an object that is using
this custom paint delegate.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
paint(
Canvas canvas, Size size) → void -
Called whenever the object needs to paint. The given Canvas has its
coordinate space configured such that the origin is at the top left of the
box. The area of the box is the size of the
sizeargument.override -
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that the
object notifies when it is time to repaint.
inherited
-
shouldRebuildSemantics(
covariant CustomPainter oldDelegate) → bool -
Called whenever a new instance of the custom painter delegate class is
provided to the RenderCustomPaint object, or any time that a new
CustomPaint object is created with a new instance of the custom painter
delegate class (which amounts to the same thing, because the latter is
implemented in terms of the former).
inherited
-
shouldRepaint(
covariant SchematicPainter oldDelegate) → bool -
Called whenever a new instance of the custom painter delegate class is
provided to the RenderCustomPaint object, or any time that a new
CustomPaint object is created with a new instance of the custom painter
delegate class (which amounts to the same thing, because the latter is
implemented in terms of the former).
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited