@@ -3,27 +3,30 @@ import '../app_window.dart';
33import 'package:flutter/foundation.dart' show kIsWeb;
44
55class _MoveWindow extends StatelessWidget {
6- _MoveWindow ({Key ? key, this .child}) : super (key: key);
6+ _MoveWindow ({Key ? key, this .child, this .onDoubleTap }) : super (key: key);
77 final Widget ? child;
8+ final VoidCallback ? onDoubleTap;
89 @override
910 Widget build (BuildContext context) {
1011 return GestureDetector (
1112 behavior: HitTestBehavior .translucent,
1213 onPanStart: (details) {
1314 appWindow.startDragging ();
1415 },
15- onDoubleTap: () => appWindow.maximizeOrRestore (),
16+ onDoubleTap: this .onDoubleTap ?? () => appWindow.maximizeOrRestore (),
1617 child: this .child ?? Container ());
1718 }
1819}
1920
2021class MoveWindow extends StatelessWidget {
2122 final Widget ? child;
22- MoveWindow ({Key ? key, this .child}) : super (key: key);
23+ final VoidCallback ? onDoubleTap;
24+ MoveWindow ({Key ? key, this .child, this .onDoubleTap}) : super (key: key);
2325 @override
2426 Widget build (BuildContext context) {
25- if (child == null ) return _MoveWindow ();
27+ if (child == null ) return _MoveWindow (onDoubleTap : this .onDoubleTap );
2628 return _MoveWindow (
29+ onDoubleTap: this .onDoubleTap,
2730 child: Column (
2831 crossAxisAlignment: CrossAxisAlignment .start,
2932 children: [Expanded (child: this .child! )]),
0 commit comments