minSized method

Widget minSized({
  1. SizeUnit? minWidth,
  2. SizeUnit? minHeight,
  3. Key? key,
})

Sets minimum width and height constraints simultaneously.

This is a convenience method for setting minimum size constraints. The widget will not shrink below these dimensions. Either or both constraints can be specified.

Example:

Container().minSized(
  minWidth: 100.size,
  minHeight: 50.size,
),

Implementation

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