computeSizeFromChild method

  1. @override
Size computeSizeFromChild(
  1. BoxConstraints constraints,
  2. Size childSize
)
override

Expands the child size by adding the padding.

Implementation

@override
Size computeSizeFromChild(BoxConstraints constraints, Size childSize) {
  return Size(
    childSize.width + padding.left + padding.right,
    childSize.height + padding.top + padding.bottom,
  );
}