insertedNode<Data, Tree extends ITreeNode<Data> > static method
Widget
insertedNode<Data, Tree extends ITreeNode<Data> >({
- required int index,
- required Tree node,
- required TreeNodeWidgetBuilder<
Tree> builder, - required AutoScrollController scrollController,
- required Animation<
double> animation, - required ExpansionIndicatorBuilder<
Data> ? expansionIndicator, - required ValueSetter<
Tree> ? onItemTap, - required ValueSetter<
Tree> onToggleExpansion, - required bool showRootNode,
- required Indentation indentation,
- required LastChildCacheManager lastChildCacheManager,
Implementation
static Widget insertedNode<Data, Tree extends ITreeNode<Data>>({
required int index,
required Tree node,
required TreeNodeWidgetBuilder<Tree> builder,
required AutoScrollController scrollController,
required Animation<double> animation,
required ExpansionIndicatorBuilder<Data>? expansionIndicator,
required ValueSetter<Tree>? onItemTap,
required ValueSetter<Tree> onToggleExpansion,
required bool showRootNode,
required Indentation indentation,
required LastChildCacheManager lastChildCacheManager,
}) {
return ValueListenableBuilder<INode>(
key: ValueKey(node.key + index.toString()),
valueListenable: node,
builder: (context, treeNode, _) => ValueListenableBuilder(
valueListenable: (treeNode as Tree).listenableData,
builder: (context, data, _) => ExpandableNodeItem<Data, Tree>(
builder: builder,
scrollController: scrollController,
node: node,
index: index,
animation: animation,
indentation: indentation,
expansionIndicatorBuilder: expansionIndicator,
onToggleExpansion: onToggleExpansion,
onItemTap: onItemTap,
showRootNode: showRootNode,
lastChildCacheManager: lastChildCacheManager,
),
),
);
}