getIntrinsicWidth method

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

Returns the intrinsic width of this element.

Implementation

@override
int getIntrinsicWidth(int height) {
  final align = widget as Align;
  final childWidth = childElement?.getIntrinsicWidth(height) ?? 0;
  return align.widthFactor != null
      ? (childWidth * align.widthFactor!).round()
      : childWidth;
}