NiceDiagram constructor

const NiceDiagram({
  1. Key? key,
  2. List<NiceDiagramNode> nodes = const [],
  3. List<NiceDiagramEdge> edges = const [],
  4. void onNodeMove(
    1. String id,
    2. double x,
    3. double y
    )?,
  5. void onNodeClick(
    1. String id
    )?,
  6. void onEdgeClick(
    1. String id
    )?,
  7. bool readOnly = false,
  8. double gridSize = 20,
  9. bool showGrid = true,
  10. bool snapToGrid = true,
  11. double? width,
  12. double? height,
})

Implementation

const NiceDiagram({
  super.key,
  this.nodes = const [],
  this.edges = const [],
  this.onNodeMove,
  this.onNodeClick,
  this.onEdgeClick,
  this.readOnly = false,
  this.gridSize = 20,
  this.showGrid = true,
  this.snapToGrid = true,
  this.width,
  this.height,
});