minWidth method

Widget minWidth(
  1. SizeUnit minWidth, [
  2. Key? key
])

Sets the minimum width constraint for this widget using a SizeUnit.

The widget will not shrink below this width, even if the parent container or flex shrinking would normally make it smaller.

The optional key parameter assigns a key to the wrapped widget.

Example:

Text('Content').minWidth(100.size),

Implementation

Widget minWidth(SizeUnit minWidth, [Key? key]) {
  return _WidgetWrapper._wrapOrCopyWith(
    child: this,
    key: key != null ? () => key : null,
    minWidth: () => minWidth,
  );
}