You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now scrollables use ScrollDirection and they're backed by render objects that use BlockDirection. However, that means ScrollDirection.both has no good mapping.
We should clean this up. I think we should probably still have two enums, one with "horizontal" and "vertical" and one with "horizontal", "vertical", and "both", but we should not split it across Block vs Scroll, instead of should split it according to who supports "both" and who doesn't.
Comment by Hixie Tuesday Sep 15, 2015 at 17:58 GMT
Briefly looked at this with @collinjackson. Scrollable right now asserts that you don't use "both". RenderViewport supports "both", nobody else seems to. We probably want a Widget to wrap RenderViewport with fling gesture support that does both, but other than that we should probably not have any use of the enum with "both".
Happy to fix this issue, but I'm not clear what we want. Here's a guess:
Scrollable should use an enum with just two values (horizontal and vertical)
Scrollable and RenderBlock should use the same enum
Viewport should use a different enum with three values
Questions:
ScrollDirection is a nice name that makes sense for Scrollable. Should we use that name for RenderBlock too even though RenderBlocks aren't necessarily related to scrolling?
What should we call the enum with three values (horizontal, vertical, both) that Viewport uses?
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
FlutterIssues commentedon Nov 9, 2015
Tuesday Sep 15, 2015 at 17:58 GMT
Briefly looked at this with @collinjackson. Scrollable right now asserts that you don't use "both". RenderViewport supports "both", nobody else seems to. We probably want a Widget to wrap RenderViewport with fling gesture support that does both, but other than that we should probably not have any use of the enum with "both".
abarth commentedon Dec 5, 2015
Happy to fix this issue, but I'm not clear what we want. Here's a guess:
Questions:
Hixie commentedon Dec 5, 2015
AxisandMultiAxis?Remove ScrollDirection.both
Hixie commentedon Jan 5, 2016
Should we still merge ScrollDirection and BlockDirection into a single enum?
abarth commentedon Jan 5, 2016
Sorry, didn't mean to close this issue. Yes, we still need to delete BlockDirection.
1 remaining item
Hixie commentedon Jan 5, 2016
Looking at abarth@4246237 (from PR #1074), I really think we should just use "Axis" as the enum name.
abarth commentedon Jan 5, 2016
Makes sense.
Remove BlockDirection in favor of ScrollDirection
Hixie commentedon Jan 7, 2016
Oh GitHub, you mean well...
github-actions commentedon Aug 17, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.