Skip to content

Problema para atualizar os itens (nós) do itemBuider do widget ListTreeView(). #43

Discussion options

You must be logged in to vote

Eu consegui resolver ontem a noite, toda vez que rebuilda eu pego o nó atualizado direto do controlador, já que nele quando eu rebuildo/reseto os dados da arvore ( treeViewcontroller.treeData(_treeNodesData); ) os nós estão atualizados.

class RouteDetailNodesTreeState extends State<RouteDetailNodesTree> {
  RouteDetailNodesTreeController controller = RouteDetailNodesTreeController();


  NodeData findNodeUpdatedFromTree(TreeNodeData root, int nodeId) {
    late NodeData nodeFound;

    if (root.nodes!.nodeId == nodeId) {
      nodeFound = root;
      return nodeFound;
    }

    if (root.children.isNotEmpty) {
      for (var child in root.children) {
        final nodeChild = child as Tre…

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
7 replies
@lucasgm1997
Comment options

@JoaoWitorFelipe
Comment options

@lucasgm1997
Comment options

@lucasgm1997
Comment options

@JoaoWitorFelipe
Comment options

Comment options

You must be logged in to vote
3 replies
@JoaoWitorFelipe
Comment options

@lucasgm1997
Comment options

@lucasgm1997
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by lucasgm1997
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants