NodeWidgetBuilder<T> typedef
NodeWidgetBuilder<T> =
Widget Function(BuildContext context, Node<T> node)
Builder function for creating a node widget.
This is used for per-instance node customization. The builder receives the node, allowing access to typed node data.
Parameters
context: The build context for widget creationnode: The node being rendered (usenode.datafor typed access)
Example
final node = Node<MyData>(
id: 'custom',
type: 'custom',
position: Offset.zero,
data: MyData(),
widgetBuilder: (context, node) {
return Container(
padding: EdgeInsets.all(8),
child: Text(node.data.title),
);
},
);
Implementation
typedef NodeWidgetBuilder<T> =
Widget Function(BuildContext context, Node<T> node);