setAlignment method

Future<void> setAlignment(
  1. Alignment alignment, {
  2. bool animate = false,
})

Move the window to a position aligned with the screen.

Implementation

Future<void> setAlignment(
  Alignment alignment, {
  bool animate = false,
}) async {
  Size windowSize = await getSize();
  Offset position = await calcWindowPosition(windowSize, alignment);
  await setPosition(position, animate: animate);
}