layout method

  1. @override
void layout(
  1. TreeMapNode root,
  2. Rect area
)
override

给定一个区域范围和节点,对该节点的Children进行布局(不包含孩子的孩子)

Implementation

@override
void layout(TreeMapNode root, Rect area) {
  root.children.sort((a, b) {
    return b.value.compareTo(a.value);
  });
  layoutChildren(ratio, root, area.left, area.top, area.right, area.bottom);
}