LukeFlowCanvas<T> constructor

const LukeFlowCanvas<T>({
  1. Key? key,
  2. required LukeFlowCanvasController<T> controller,
  3. required Widget nodeBuilder(
    1. NodeModel<T> node
    ),
  4. Widget socketBuilder(
    1. NodeModel<T> node,
    2. NodeSocketModel socket
    )?,
  5. LukeEdgePainter edgeBuilder(
    1. Offset source,
    2. Offset target,
    3. EdgeConnectionsModel edgeConnection
    )?,
  6. double socketWidth = 20,
  7. double socketHeight = 20,
  8. double socketRadius = 100,
  9. dynamic onUpdate(
    1. List<NodeModel<T>> nodes,
    2. List<EdgeConnectionsModel> connections
    )?,
  10. double width = 2024 * 8,
  11. double height = 2024 * 8,
  12. dynamic onMouseMove(
    1. Vector2 position
    )?,
  13. BackgroundGridSettings? bacgrkoundGridSettings,
  14. BackgroundGridSettings? secondaryBacgrkoundGridSettings,
  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.controller,
  required this.nodeBuilder,
  this.socketBuilder,
  this.edgeBuilder,
  this.socketWidth = 20,
  this.socketHeight = 20,
  this.socketRadius = 100,
  this.onUpdate,
  this.width = 2024 * 8,
  this.height = 2024 * 8,
  this.onMouseMove,
  this.bacgrkoundGridSettings,
  this.secondaryBacgrkoundGridSettings,
  this.onConnectionError,
  this.onEdgeDrop,
  this.onNodesDeleted,
  this.onDoubleTap,
});