Network class
Network graph visualization widget.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- Network
Constructors
-
Network({Key? key, required List<
NetworkNode> nodes, required List<NetworkLink> links, double? width, double? height, bool enableSimulation = true, ForceSimulation? simulation, Color nodeColor = Colors.blue, Color? nodeBorderColor, double nodeBorderWidth = 2, bool showNodeLabels = true, TextStyle? nodeLabelStyle, NodeShape nodeShape = NodeShape.circle, Color linkColor = Colors.grey, double linkWidth = 1, LinkStyle linkStyle = LinkStyle.straight, bool showLinkLabels = false, TextStyle? linkLabelStyle, Map<String, Color> ? groupColors, bool draggableNodes = true, bool enableZoomPan = true, double minZoom = 0.1, double maxZoom = 4.0, void onNodeTap(NetworkNode node)?, void onLinkTap(NetworkLink link)?, void onNodeDrag(NetworkNode node)?, void onSimulationStateChange(bool running)?}) -
const
Properties
- draggableNodes → bool
-
Whether nodes are draggable.
final
- enableSimulation → bool
-
Whether to run force simulation.
final
- enableZoomPan → bool
-
Whether to enable zoom and pan.
final
-
groupColors
→ Map<
String, Color> ? -
Color mapping for node groups.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Height of the visualization.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- linkColor → Color
-
Default link color.
final
- linkLabelStyle → TextStyle?
-
Link label style.
final
-
links
→ List<
NetworkLink> -
Links between nodes.
final
- linkStyle → LinkStyle
-
Default link style.
final
- linkWidth → double
-
Default link width.
final
- maxZoom → double
-
Maximum zoom level.
final
- minZoom → double
-
Minimum zoom level.
final
- nodeBorderColor → Color?
-
Default node border color.
final
- nodeBorderWidth → double
-
Default node border width.
final
- nodeColor → Color
-
Default node color.
final
- nodeLabelStyle → TextStyle?
-
Node label style.
final
-
nodes
→ List<
NetworkNode> -
Nodes in the network.
final
- nodeShape → NodeShape
-
Default node shape.
final
- onLinkTap → void Function(NetworkLink link)?
-
Callback when a link is tapped.
final
- onNodeDrag → void Function(NetworkNode node)?
-
Callback when a node is dragged.
final
- onNodeTap → void Function(NetworkNode node)?
-
Callback when a node is tapped.
final
- onSimulationStateChange → void Function(bool running)?
-
Callback when simulation state changes.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showLinkLabels → bool
-
Whether to show link labels.
final
- showNodeLabels → bool
-
Whether to show node labels.
final
- simulation → ForceSimulation?
-
Force simulation configuration.
final
- width → double?
-
Width of the visualization.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< Network> -
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