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 {
  final windowSize = await getSize();
  final position = await calcWindowPosition(windowSize, alignment);
  await setPosition(position, animate: animate);
}