LukeFlowCanvas<T> constructor

const LukeFlowCanvas<T>({
  1. Key? key,
  2. required List<NodeModel<T>> nodes,
  3. required Widget nodeBuilder(
    1. NodeModel<T> node
    ),
  4. required LukeFlowCanvasController<T> controller,
  5. Widget socketBuilder(
    1. NodeModel<T> node,
    2. NodeSocketModel socket
    )?,
  6. double socketWidth = 20,
  7. double socketHeight = 20,
  8. double socketRadius = 100,
  9. List<EdgeConnectionsModel> initialConnections = const [],
  10. dynamic onUpdate(
    1. List<NodeModel<T>> nodes,
    2. List<EdgeConnectionsModel> connections
    )?,
  11. double width = 2024 * 5,
  12. double height = 2024 * 5,
  13. dynamic onMouseMove(
    1. Vector2 position
    )?,
  14. BackgroundGridSettings? bacgrkoundGridSettings,
  15. dynamic onConnectionError(
    1. EdgeConnectionsModel connection
    )?,
  16. dynamic onEdgeDrop(
    1. NodeSocketModel source,
    2. Vector2 dropPosition
    )?,
  17. dynamic onNodesDeleted(
    1. List<NodeModel> deletedNode
    )?,
  18. dynamic onDoubleTap(
    1. Vector2 mousePosition
    )?,
})

Implementation

const LukeFlowCanvas({
  super.key,
  required this.nodes,
  required this.nodeBuilder,
  required this.controller,
  this.socketBuilder,
  this.socketWidth = 20,
  this.socketHeight = 20,
  this.socketRadius = 100,
  this.initialConnections = const [],
  this.onUpdate,
  this.width = 2024 * 5,
  this.height = 2024 * 5,
  this.onMouseMove,
  this.bacgrkoundGridSettings,
  this.onConnectionError,
  this.onEdgeDrop,
  this.onNodesDeleted,
  this.onDoubleTap,
});