GraphView<T> constructor

GraphView<T>({
  1. required Set<T> nodes,
  2. required Set<Edge<T>> edges,
  3. required Widget nodeBuilder(
    1. T data,
    2. BuildContext context
    ),
  4. required Widget edgeBuilder(
    1. Edge<T> edge,
    2. double rotation,
    3. BuildContext context
    ),
  5. required double width,
  6. required double height,
  7. EdgeInsets padding = const EdgeInsets.all(10),
  8. Duration duration = const Duration(milliseconds: 400),
  9. Curve curve = Curves.easeInOutExpo,
  10. GraphController<T>? controller,
  11. GraphLayoutAlgorithm algorithm = const FruchtermanReingoldAlgorithm(),
  12. bool animated = true,
  13. bool draggableNodes = true,
  14. bool draggingPinsNodes = false,
})

Implementation

GraphView({
  required this.nodes,
  required this.edges,
  required this.nodeBuilder,
  required this.edgeBuilder,
  required this.width,
  required this.height,
  this.padding = const EdgeInsets.all(10),
  this.duration = const Duration(milliseconds: 400),
  this.curve = Curves.easeInOutExpo,
  this.controller,
  this.algorithm = const FruchtermanReingoldAlgorithm(),
  this.animated = true,
  this.draggableNodes = true,
  this.draggingPinsNodes = false,
}) {
  assert(_nodesContainsAllEdgeNodes(nodes, edges));
}