setHorizontalSizeBox method

Widget setHorizontalSizeBox(
  1. double width
)

Creates a horizontal spacing widget with fixed width.

Unlike addHorizontalSpace which uses responsive sizing, this method creates a SizedBox with an exact width value.

Parameters:

  • width: The exact width in logical pixels.

Returns a SizedBox with the specified width.

Example:

setHorizontalSizeBox(16.0); // Exactly 16 pixels of horizontal space

See also:

Implementation

Widget setHorizontalSizeBox(double width) {
  return SizedBox(
    width: width,
  );
}