measure method

  1. @override
void measure(
  1. double parentWidth,
  2. double parentHeight
)

Implementation

@override
void measure(double parentWidth, double parentHeight) {
  if (measureCompleted && (boundRect.width - parentWidth).abs() < 1 && (boundRect.height - parentHeight).abs() < 1) {
    return;
  }
  Size size = onMeasure(parentWidth, parentHeight);
  oldBoundRect = boundRect;
  boundRect = Rect.fromLTWH(0, 0, size.width, size.height);
  for (var element in children) {
    element.measure(size.width, size.height);
  }
}