LukeFlowCanvas<T, E> constructor

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

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.width = 2024 * 8,
  this.height = 2024 * 8,
  this.bacgrkoundGridSettings,
  this.secondaryBacgrkoundGridSettings,
  this.onUpdate,
  this.onMouseMove,
  this.onConnectionError,
  this.onEdgeDrop,
  this.onNodesDeleted,
  this.onDoubleTap,
  this.onBeforeConnectionCreate,
});