W3cubDocs

/Dart 2

width property

T width

The width of the rectangle.

Implementation

T get width => _width;
void width= (T width)

Sets the width of the rectangle.

The width must be non-negative. If a negative width is supplied, it is clamped to zero.

Setting the value will change the right edge of the rectangle, but will not change left.

Implementation

set width(T width) {
  if (width < 0) width = _clampToZero<T>(width);
  _width = width;
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-math/MutableRectangle/width.html