getIntrinsicHeight method

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

Returns the intrinsic height of this element.

Implementation

@override
int getIntrinsicHeight(int width) {
  _computeBorderOffsets();
  final doubleWidth = _cachedLeftOffset + _cachedRightOffset;
  final doubleHeight = _cachedTopOffset + _cachedBottomOffset;
  final childWidth = max(0, width - doubleWidth);
  return (childElement?.getIntrinsicHeight(childWidth) ?? 0) + doubleHeight;
}