-
Notifications
You must be signed in to change notification settings - Fork 10
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
Added Support for Horizontal Listing #4
Conversation
lib/src/draggable_scrollbar.dart
Outdated
@@ -123,6 +140,16 @@ class DraggableScrollbarState extends State<DraggableScrollbar> with TickerProvi | |||
globalPosition: Offset.zero, | |||
delta: Offset(0, -2), | |||
)); | |||
else if (value.logicalKey == LogicalKeyboardKey.arrowRight) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we should limit the keys to the actual scroll direction? Maybe:
widget.scrollDirection == Axis.horizontal && value.logicalKey == LogicalKeyboardKey.arrowRight
Also, PgDn
and PgUp
should probably also work in horizontal mode, with different effect?
delta: widget.scrollDirection == Axis.horizontal ? Offset(25, 0) : Offset(0, 25),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah! Correct.
changed it accordingly.
lib/src/draggable_scrollbar.dart
Outdated
@@ -27,6 +28,7 @@ class DraggableScrollbar extends StatefulWidget { | |||
this.currentFirstIndex = 0, | |||
required this.scrollThumbBuilder, | |||
this.onChange, | |||
required this.scrollDirection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd actually prefer this to be not required, defaulting to vertical
, so that we don't introduce an unnecessary breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay.
Changed it.
Thanks. |
Also added the same to the Up and Down keys and a few comments to force the |
I am expecting a new version in pub.dev along with this change. |
But it was published back then... :-)) Version 2.0.1, as described in the changelog. Do you experience any issue with not receiving it from Pub.dev? |
Oh, dear me, sorry, I mixed the two PRs. My bad. I'll upload it now. Sorry. |
No worries. |
2.0.2 already there but I should've also changed the README to describe the new functionality. This will also come. |
No description provided.