setPosition method

Future<void> setPosition(
  1. String id,
  2. Offset position, {
  3. String? anchor,
  4. bool animate = false,
  5. int? durationMs,
  6. String? curve,
})

Set window position.

The anchor specifies which point of the window is placed at position. For example, Anchor.center centers the window at position.

Implementation

Future<void> setPosition(
  String id,
  Offset position, {
  String? anchor,
  bool animate = false,
  int? durationMs,
  String? curve,
}) async {
  await send<void>('setPosition', windowId: id, params: {
    'x': position.dx,
    'y': position.dy,
    'anchor': ?anchor,
    'animate': animate,
    'durationMs': ?durationMs,
    'curve': ?curve,
  });
}