NodeWidget constructor

const NodeWidget({
  1. Key? key,
  2. List<Widget>? content,
  3. MainAxisSize rowMainAxisSize = MainAxisSize.min,
  4. Widget leading = const NodeWidgetLeadingIcon(),
  5. VoidCallback? onTap,
  6. VoidCallback? onLongPress,
})

Creates a NodeWidget.

Notice that the leading NodeWidgetLeadingIcon used is responsible for expanding/collapsing the node, if changed, the node would need to be manually toggled through either TreeView.of or TreeNodeScope.

Take a look at ExpandNodeIcon that has a similar implementation.

Implementation

const NodeWidget({
  Key? key,
  this.content,
  this.rowMainAxisSize = MainAxisSize.min,
  this.leading = const NodeWidgetLeadingIcon(),
  this.onTap,
  this.onLongPress,
}) : super(key: key);