MinimapExtension class

Minimap extension for managing minimap state and behavior.

This extension provides reactive state for minimap visibility, position, and highlight features. The actual minimap widget consumes this state.

Usage

// Create with visibility enabled
MinimapExtension(visible: true);

// Configure position and theme
MinimapExtension(
  visible: true,
  position: MinimapPosition.topLeft,
  theme: MinimapTheme.dark,
);

// Toggle visibility at runtime
controller.minimap?.toggle();

// Highlight nodes (e.g., search results)
controller.minimap?.highlightNodes({'node-1', 'node-3'});
Inheritance

Constructors

MinimapExtension({bool visible = false, bool interactive = true, MinimapPosition position = MinimapPosition.bottomRight, Size size = const Size(200, 150), double margin = 20.0, bool autoHighlightSelection = true, MinimapTheme theme = MinimapTheme.light})
Creates a minimap extension.

Properties

autoHighlightSelection bool
Whether to auto-highlight selected nodes.
no setter
hashCode int
The hash code for this object.
no setterinherited
highlightedNodeIds Set<String>
Node IDs to highlight in the minimap.
no setter
highlightRegion Rect?
Optional region to highlight (e.g., search results area).
no setter
id String
Unique identifier for this extension.
no setteroverride
isInteractive bool
Whether the minimap can be interacted with.
no setter
isVisible bool
Whether the minimap is currently visible.
no setter
margin double
Margin from the edge of the editor to the minimap.
final
position MinimapPosition
Current position/corner of the minimap.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size Size
Current size of the minimap in pixels.
no setter
theme MinimapTheme
The visual theme for the minimap.
no setter

Methods

attach(NodeFlowController controller) → void
Called when the extension is attached to a controller.
override
centerOn(Offset graphPosition) → void
Centers the main viewport on the given graph position.
clearHighlights() → void
Clears all highlights.
cyclePosition() → void
Cycles to the next position (clockwise).
detach() → void
Called when the extension is detached from the controller.
override
disableInteraction() → void
Disables minimap interaction.
enableInteraction() → void
Enables minimap interaction.
focusNodes(Set<String> nodeIds) → void
Pans to show the specified nodes.
hide() → void
Hides the minimap.
highlightArea(Rect region) → void
Highlights a rectangular region in the minimap.
highlightNodes(Set<String> nodeIds) → void
Highlights specific nodes in the minimap.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onEvent(GraphEvent event) → void
Called when a graph event occurs.
override
setAutoHighlightSelection(bool value) → void
Sets whether to auto-highlight selected nodes in the minimap.
setHeight(double height) → void
Sets the minimap height, keeping width unchanged.
setInteractive(bool interactive) → void
Sets minimap interaction state.
setPosition(MinimapPosition pos) → void
Sets the minimap position.
setSize(Size size) → void
Sets the minimap size.
setVisible(bool visible) → void
Sets minimap visibility.
setWidth(double width) → void
Sets the minimap width, keeping height unchanged.
show() → void
Shows the minimap.
toggle() → void
Toggles minimap visibility.
toggleInteraction() → void
Toggles minimap interaction.
toString() String
A string representation of this object.
inherited

Operators

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