resizeWindow method
dynamic
resizeWindow({})
Implementation
resizeWindow(
{required Key key,
required double dx,
required double dy,
bool moveHorizontalBase = false,
bool moveVerticalBase = false}) {
final wwi = _findWindowWithIndex(key);
final newWindow = wwi.windowState.copyWith(
x: moveHorizontalBase &&
wwi.windowState.width + dx > wwi.windowState.minWidth
? wwi.windowState.x - dx
: null,
y: moveVerticalBase &&
wwi.windowState.height + dy > wwi.windowState.minHeight
? wwi.windowState.y - dy
: null,
width: (wwi.windowState.width + dx)
.clamp(wwi.windowState.minWidth, double.infinity),
height: (wwi.windowState.height + dy)
.clamp(wwi.windowState.minHeight, double.infinity),
);
_windows[wwi.index] = newWindow;
notifyListeners();
}