setBounds method
Resizes and moves the window to the supplied bounds.
Implementation
Future<void> setBounds(
Rect? bounds, {
Offset? position,
Size? size,
bool animate = false,
}) async {
final Map<String, dynamic> arguments = {
'devicePixelRatio': getDevicePixelRatio(),
'x': bounds?.topLeft.dx ?? position?.dx,
'y': bounds?.topLeft.dy ?? position?.dy,
'width': bounds?.size.width ?? size?.width,
'height': bounds?.size.height ?? size?.height,
'animate': animate,
}..removeWhere((key, value) => value == null);
await _invokeMethod('setBounds', arguments);
}