Skip to content

Commit

Permalink
Toggle maximize instead
Browse files Browse the repository at this point in the history
  • Loading branch information
RHeckerIntel committed Dec 20, 2024
1 parent 3d33ef6 commit 7861f5d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/openvino_console_app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@ class _OpenVINOTestDriveAppState extends State<OpenVINOTestDriveApp> {
return index;
}

void toggleMaximize() {
windowManager.isMaximized().then((isMaximized) {
if (isMaximized) {
windowManager.unmaximize();
} else {
windowManager.maximize();
}
});
}

@override
Widget build(BuildContext context) {
return Stack(
Expand All @@ -143,7 +153,7 @@ class _OpenVINOTestDriveAppState extends State<OpenVINOTestDriveApp> {
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTapDown: (_) => windowManager.startDragging(),
onDoubleTap: () => windowManager.maximize(),
onDoubleTap: toggleMaximize,
child: SizedBox(
height: 48,
child: Align(
Expand Down

0 comments on commit 7861f5d

Please sign in to comment.