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

Gestures are not detected on the right side of the screen when position is set to right #7

Open
rjs580 opened this issue Mar 2, 2024 · 1 comment

Comments

@rjs580
Copy link

rjs580 commented Mar 2, 2024

The reason this happens is because the Stack used to add the _Content and _Drawer fits loosely. Which means it will not expand to the entire screen just the first width it detects. This is what it looks likes:

The black area is where the gestures are not being detected. If we change the Stack.fit to StackFit.expand (fit: StackFit.expand) we get:

This enabled me to add buttons and any related widgets to the end and it will work correctly. The reason I am making this issue is that now the drawer position when animating in is off by (screenWidth - drawerWidth). What is the best way to go about fixing this issue?

Thanks 😁

@rjs580
Copy link
Author

rjs580 commented Mar 2, 2024

I fixed the issue by surrounding the Container in _Drawer with the Align widget.

Align(
  alignment: Alignment.topLeft,
  child: Container(
    width: drawerWidth,
    height: constraints.maxHeight,
    child: drawerBuilder(context),
  ),
)

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

1 participant