buildFromConstraints static method

LayoutInfo buildFromConstraints(
  1. BoxConstraints c
)

Generates LayoutInfo from the BoxConstraints of the LayoutBuilder. Uses deviceByWeigth to catch the right LayoutDevice by maxWidth.

Implementation

static LayoutInfo buildFromConstraints(BoxConstraints c) {
  final width = c.maxWidth;
  return LayoutInfo(constraints: c, device: deviceFromWeight(width));
}