Network constructor
const
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
Implementation
const Network({
super.key,
required this.nodes,
required this.links,
this.width,
this.height,
this.enableSimulation = true,
this.simulation,
this.nodeColor = Colors.blue,
this.nodeBorderColor,
this.nodeBorderWidth = 2,
this.showNodeLabels = true,
this.nodeLabelStyle,
this.nodeShape = NodeShape.circle,
this.linkColor = Colors.grey,
this.linkWidth = 1,
this.linkStyle = LinkStyle.straight,
this.showLinkLabels = false,
this.linkLabelStyle,
this.groupColors,
this.draggableNodes = true,
this.enableZoomPan = true,
this.minZoom = 0.1,
this.maxZoom = 4.0,
this.onNodeTap,
this.onLinkTap,
this.onNodeDrag,
this.onSimulationStateChange,
});