TreeMap constructor

TreeMap(
  1. {required TreeNode root,
  2. required Size size,
  3. Tile tile = const Squarify(),
  4. bool round = false}
)

Implementation

TreeMap({
  required this.root,
  required this.size,
  this.tile = const Squarify(),
  this.round = false,
})  : assert(root.children!.length > 0),
      assert(size.width > 0 && size.height > 0) {
  root.right = size.width;
  root.bottom = size.height;
  root.eachBefore(_positionNode);
  if (round) root.eachBefore(_roundNode);
}