Network constructor

const Network({
  1. Key? key,
  2. required List<NetworkNode> nodes,
  3. required List<NetworkLink> links,
  4. double? width,
  5. double? height,
  6. bool enableSimulation = true,
  7. ForceSimulation? simulation,
  8. Color nodeColor = Colors.blue,
  9. Color? nodeBorderColor,
  10. double nodeBorderWidth = 2,
  11. bool showNodeLabels = true,
  12. TextStyle? nodeLabelStyle,
  13. NodeShape nodeShape = NodeShape.circle,
  14. Color linkColor = Colors.grey,
  15. double linkWidth = 1,
  16. LinkStyle linkStyle = LinkStyle.straight,
  17. bool showLinkLabels = false,
  18. TextStyle? linkLabelStyle,
  19. Map<String, Color>? groupColors,
  20. bool draggableNodes = true,
  21. bool enableZoomPan = true,
  22. double minZoom = 0.1,
  23. double maxZoom = 4.0,
  24. void onNodeTap(
    1. NetworkNode node
    )?,
  25. void onLinkTap(
    1. NetworkLink link
    )?,
  26. void onNodeDrag(
    1. NetworkNode node
    )?,
  27. void onSimulationStateChange(
    1. 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,
});