Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't change only enableDrag flag while being shown overlay #134

Open
kimilini1227 opened this issue Sep 9, 2024 · 1 comment
Open

Can't change only enableDrag flag while being shown overlay #134

kimilini1227 opened this issue Sep 9, 2024 · 1 comment

Comments

@kimilini1227
Copy link

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: ...
}
@sunjiaming
Copy link

I think so,This role must be defined as a separate method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants