drawerEdgeDragWidth to max blocks all child horizontal gestures
- Dominant language
- Dart
- Stars
- 179k
- Forks
- 31.1k
- PR merge metrics
- PR metrics pending
Description
### Steps to reproduce
this is a continuation for https://github.com/flutter/flutter/issues/139025 dug into properly...
when using in a parent Scaffold with a Drawer `drawerEdgeDragWidth: MediaQuery.of(context).size.width` the `drawerEdgeDragWidth` is working perfectly but the whole screen but is blocked from any other horizontal gestures meaning- no child can have horizontal activity even when `endDrawerEnableOpenDragGesture: false` is determined.
(video below)
example:
```
return Scaffold(
drawerEdgeDragWidth: MediaQuery.of(context).size.width,
endDrawerEnableOpenDragGesture: false,
drawer: Drawer(),
body: Column(children: [
SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(children: [
for (var i in controller.cards)
Cards(cards: i),
for (var i in controller.demoCards)
DemoCards(i)
]),
)
]));
```
correct me if I'm wrong but I believe this is because the enddrawer keeps receiving inputs for it even if it's empty or disabled which doesn't allow any activity for horizontal scroll in child widgets etc...
---
FYI when doing the exact same thing with GestureDetector it all works fine.
```
return GestureDetector(
onPanUpdate: (details) {
// Swiping in right direction.
if (details.delta.dx > 0) {
Scaffold.of(context).openDrawer();
},
child: Scaffold(
drawer: Drawer(),
body: Column(children: [
SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(children: [
for (var i in controller.cards)
Cards(cards: i),
for (var i in controller.demoCards)
DemoCards(i)
]),
)
])));
```
### Expected results
in a situation like this if the enddrawer is disabled there should be an allowance for somewhat of an opaque allowance for child gestures to be triggered. a bit like how the GestureDetector example above is presented.
### Actual results
no child can have horizontal activity even when `endDrawerEnableOpenDragGesture: false` is determined.
### Screenshots or Video
here's a video explaining the bug exactly:
https://github.com/flutter/flutter/assets/33470998/14c8cc60-50ef-4bef-8309-9b74d7654375
here's how to bypass it:
https://github.com/flutter/flutter/assets/33470998/4f348955-2105-4df6-80d9-3c8e57b51160
problem with this is that you can't control the drag rate, it instantly drags instead of gradually.
### Flutter Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.8, on macOS 14.2.1 23C71 darwin-x64, locale
en-GB)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for
more details.
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.85.1)
[✓] Connected device (3 available)
[✓] Network resources
! Doctor found issues in 1 category.
Contributor guide
Assessment
This issue has not been assessed yet.