size property

Size get size

The current size of this box, or Size.zero if not laid out

Implementation

Size get size => _size ?? Size.zero;
set size (Size value)

Set the size of this box

Implementation

set size(Size value) {
  if (value.width < 0 || value.height < 0) {
    throw StateError(
      '$runtimeType produced an invalid negative size: $value.',
    );
  }
  _size = value;
  width = value.width;
  height = value.height;
}