widthOf method

double widthOf(
  1. AbstractNode? node
)

Implementation

double widthOf(AbstractNode? 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();
}