withWidth method

SizedBox withWidth(
  1. double width
)

Wraps the widget inside a SizedBox with a custom width.

Text("Hello").withWidth(200);

Implementation

SizedBox withWidth(double width) => SizedBox(width: width, child: this);