setAlignment method
Move the window to a position aligned with the screen.
Supported Platforms:
- Windows
- macOS
- Linux (X11 only)
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);
}