getIntrinsicHeight method

  1. @override
int getIntrinsicHeight(
  1. int width
)
override

Computes the intrinsic height of this widget under the given width constraint.

Implementation

@override
int getIntrinsicHeight(int width) {
  final childWidth = width - padding.left - padding.right;
  if (childWidth <= 0) return padding.top + padding.bottom;
  return child.getIntrinsicHeight(childWidth) + padding.top + padding.bottom;
}