widthOf method

double widthOf(
  1. RenderObject? node
)

Implementation

double widthOf(RenderObject? node) {
  double? width;
  while (true) {
    if (node == null) break;
    if (node is RenderBox && node.constraints.hasBoundedWidth) {
      width = node.constraints.maxWidth;
      break;
    }
    node = node.parent;
  }
  return width ?? System().screenheight.toDouble();
}