nodeContainerBuilder property

Widget Function(BuildContext context, Node<T> node, Widget content)? nodeContainerBuilder
final

Optional builder for customizing the node container.

Receives the node content (from nodeBuilder) and the node itself. By default, nodes are wrapped in a NodeWidget with standard functionality.

You can use this to:

  • Return NodeWidget with custom appearance parameters
  • Wrap NodeWidget with additional decorations
  • Create completely custom node containers

Example:

nodeContainerBuilder: (context, node, content) {
  return Container(
    decoration: BoxDecoration(
      border: Border.all(color: Colors.blue, width: 2),
    ),
    child: NodeWidget(node: node, child: content),
  );
}

Implementation

final Widget Function(BuildContext context, Node<T> node, Widget content)?
nodeContainerBuilder;