getIntrinsicWidth method

  1. @override
int getIntrinsicWidth(
  1. int height
)
override

Returns the intrinsic width of this element.

Implementation

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