withSize method

SizedBox withSize({
  1. double width = 0.0,
  2. double height = 0.0,
})

Wraps the widget inside a SizedBox with a custom height and width.

Container().withSize(width: 100, height: 50);

Implementation

SizedBox withSize({double width = 0.0, double height = 0.0}) =>
    SizedBox(height: height, width: width, child: this);