size method

void size({
  1. num? width,
  2. num? height,
})

Replaces width and/or height on supported widgets.

Implementation

void size({num? width, num? height}) {
  if (width == null && height == null) {
    throw ArgumentError('size(...) requires width, height, or both.');
  }
  _width = width?.toDouble();
  _height = height?.toDouble();
}