inflateRect method
Returns a new rect that is bigger than the given rect in each direction by the amount of inset in each direction. Specifically, the left edge of the rect is moved left by left, the top edge of the rect is moved up by top, the right edge of the rect is moved right by right, and the bottom edge of the rect is moved down by bottom.
See also:
- inflateSize, to inflate a Size rather than a Rect.
- deflateRect, to deflate a Rect rather than inflating it.
Implementation
Rect inflateRect(Rect rect) {
return Rect.fromLTRB(rect.left - left, rect.top - top, rect.right + right, rect.bottom + bottom);
}