getVaryFromNode method

dynamic getVaryFromNode(
  1. dynamic node,
  2. dynamic type
)

Implementation

getVaryFromNode(node, type) {
  Map nodeData = this.getDataFromNode(node, null);

  var nodeVary = nodeData["vary"];

  if (nodeVary == undefined) {
    var varys = this.varys;
    var index = varys.length;

    nodeVary = new NodeVary('nodeVary${index}', type);

    varys.add(nodeVary);

    nodeData["vary"] = nodeVary;
  }

  return nodeVary;
}