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

Option for adjusting angle of horizontal scroll in TabBarView #110567

Open
dayoul opened this issue Aug 30, 2022 · 8 comments
Open

Option for adjusting angle of horizontal scroll in TabBarView #110567

dayoul opened this issue Aug 30, 2022 · 8 comments
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter f: gestures flutter/packages/flutter/gestures repository. f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project team-framework Owned by Framework team triaged-framework Triaged by Framework team

Comments

@dayoul
Copy link

dayoul commented Aug 30, 2022

Current TabBarView's sensitivity for detecting horizontal scroll is quite massive.
It would be great if I can give an option for it (something like value between 0.0~1.0).

This feature is needed because when users scroll vertically, finger gestures are not completely vertical. It is somewhere between vertical and horizontal. Now, lot of times I encounter situation that TabBar is scrolling horizontally even if I intended to scroll vertically.

PS) If there is any workaround for this, please let me know. Thanks.

@exaby73 exaby73 added the in triage Presently being triaged by the triage team label Aug 30, 2022
@exaby73
Copy link
Member

exaby73 commented Aug 30, 2022

Hello @dayoul. Thank you for filing this issue. Can you please provide the following information?

@exaby73 exaby73 added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Aug 30, 2022
@dayoul
Copy link
Author

dayoul commented Aug 31, 2022

Current

current_tabbarview

Suggesting

suggesting_tabbarview

I think it would be great if I can give a threshold value for horizontal scrolling(either to TabBarView or TabController).
For Example

/// Maximum scrollThreshold : 1.0 (45 degrees)
TabController(length: 3, vsync: this, scrollThreshold: 0.5);

Below is my result of flutter doctor -v

[√] Flutter (Channel stable, 3.0.1, on Microsoft Windows [Version 10.0.18363.2212], locale ko-KR)
    • Flutter version 3.0.1 at C:\flutter_windows_3.0.1-stable\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision fb57da5f94 (3 months ago), 2022-05-19 15:50:29 -0700
    • Engine revision caaafc5604
    • Dart version 2.17.1
    • DevTools version 2.12.2

Checking Android licenses is taking an unexpectedly long time...[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at C:\Users\dayoul.son\AppData\Local
    • Platform android-33, build-tools 31.0.0
    • ANDROID_HOME = C:\Users\dayoul.son\AppData\Local
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 2020.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[√] VS Code (version 1.70.1)
    • VS Code at C:\Users\dayoul.son\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.46.0

[√] Proxy Configuration
    • HTTP_PROXY is set
    • NO_PROXY is localhost, 127.0.0.1, ::1
    • NO_PROXY contains localhost
    • NO_PROXY contains ::1
    • NO_PROXY contains 127.0.0.1

[√] Connected device (4 available)
    • SM F926N (mobile) • R3CR30XRJ0 • android-arm64  • Android 11 (API 30)
    • Windows (desktop) • windows    • windows-x64    • Microsoft Windows [Version 10.0.18363.2212]
    • Chrome (web)      • chrome     • web-javascript • Google Chrome 105.0.5195.52
    • Edge (web)        • edge       • web-javascript • Microsoft Edge 103.0.1264.62

[√] HTTP Host Availability
    • All required HTTP hosts are available

PS) If there is any workaround for this, please let me know. Thanks.

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Aug 31, 2022
@huycozy
Copy link
Member

huycozy commented Aug 31, 2022

Hi @dayoul, thank you for the very detailed sample. But I see there's an open issue addressing the case you described #11132. Do you find there similar to this issue?

@huycozy huycozy added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Aug 31, 2022
@dayoul
Copy link
Author

dayoul commented Sep 1, 2022

Issue #11132 is quite similar but the approach for the workaround is different. Comment at #11132 is mentioning about customizing the gesture distance(And I think it's not even developed yet). What I have asking is about customizing the gesture angle when detecting horizontal scrolling.

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Sep 1, 2022
@exaby73
Copy link
Member

exaby73 commented Sep 1, 2022

Hello @dayoul. Thank you for the feedback. I can see the difference from the 2 issues. Labelling for further insights from the team.

@exaby73 exaby73 changed the title Option for adjusting sensitivity of horizontal scroll in TabBarView Option for adjusting angle of horizontal scroll in TabBarView Sep 1, 2022
@exaby73 exaby73 changed the title Option for adjusting angle of horizontal scroll in TabBarView Option for adjusting angle of horizontal scroll in TabBarView Sep 1, 2022
@exaby73 exaby73 added c: new feature Nothing broken; request for a new capability framework flutter/packages/flutter repository. See also f: labels. f: scrolling Viewports, list views, slivers, etc. f: gestures flutter/packages/flutter/gestures repository. c: proposal A detailed proposal for a change to Flutter and removed in triage Presently being triaged by the triage team labels Sep 1, 2022
@goderbauer goderbauer added the P3 Issues that are less important to the Flutter project label Sep 13, 2022
@MrJohnDev
Copy link

Also need this

@VictorWork0209
Copy link

Does this new feature also got added into SingleChildScrollView?

@cwebbtw
Copy link

cwebbtw commented Apr 27, 2024

Are there any workarounds for getting this behaviour? It feels rather common to have a vertical scrollable inside a tabbarview which often results in the tab page swiping rather than the vertical scrollable content.

Looking at Facebook or instagram, the angle of the swipe is considerably tighter such that you almost have to be swiping horizontally for it to not vertically scroll.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter f: gestures flutter/packages/flutter/gestures repository. f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project team-framework Owned by Framework team triaged-framework Triaged by Framework team
Projects
None yet
Development

No branches or pull requests

7 participants