flutter_overlay_window
flutter_overlay_window copied to clipboard
Can't change only enableDrag flag while being shown overlay
Hi.
I create overlay paiting app.
Therefore I need to switch enableDrag flag depend on whether start position of dragging is on canvas or top window bar.
However according to the documentation the way that change enableDrag flag while being shown overlay is only resizeOverlay that end up changing overlay size so I can't change only enableDrag flag.
In the first place why resizeOverlay have a role change enableDrag flag?
This role must be defined as a separate method.
My showOverlay
FlutterOverlayWindow.showOverlay(
height: HEIGHTOVERLAY,
width: WIDTHOVERLAY,
alignment: OverlayAlignment.topLeft,
flag: OverlayFlag.defaultFlag,
enableDrag: true,
positionGravity: PositionGravity.none,
startPosition: OverlayPosition(XPOSOVERLAY, YPOSOVERLAY),
);
My GestureDetector in canvas
GestureDetector(
onPanStart: (DragStartDetails start) async {
await FlutterOverlayWindow.updateEnableDrag(false);
},
onPanEnd: (DragEndDetails end) async {
await FlutterOverlayWindow.updateEnableDrag(true);
},
child: ...
}