79550199

Date: 2025-04-02 09:16:03
Score: 1
Natty:
Report link
bool _shouldCollapse = true;
onTreeReady: (controller) {
    if (_shouldCollapse && rootNode.children.isNotEmpty) {
      WidgetsBinding.instance.addPostFrameCallback((_) {
        if (mounted) {
            controller.collapseNode(rootNode.children.first as IndexedTreeNode<NodePayload>);
            setState(() => _shouldCollapse = false);
        }
      });
    }
},

                
Reasons:
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: gost