SizedBoxExtension extension

Extension methods for Widget that provide convenient sizing functionality.

This extension adds methods to easily wrap widgets in SizedBox containers with specific width and height constraints. All methods return new SizedBox widgets without modifying the original widget.

The extension provides both combined sizing (sizedBox) and individual dimension control (sizedWidth, sizedHeight) for flexible layout control.

Example usage:

Text('Fixed size text')
  .sizedBox(width: 200, height: 100)
  .sizedWidth(150); // Override width to 150
on

Methods

sizedBox({double? width, double? height}) SizedBox

Available on Widget, provided by the SizedBoxExtension extension

Wraps the widget in a SizedBox with the specified dimensions.
sizedHeight(double height) SizedBox

Available on Widget, provided by the SizedBoxExtension extension

Wraps the widget in a SizedBox with a specific height.
sizedWidth(double width) SizedBox

Available on Widget, provided by the SizedBoxExtension extension

Wraps the widget in a SizedBox with a specific width.