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

Added Support for Horizontal Listing #4

Merged
merged 4 commits into from
Apr 22, 2021

Conversation

MohamedRisaldarTA
Copy link
Contributor

No description provided.

@MohamedRisaldarTA MohamedRisaldarTA changed the title Added Supported for Horizontal Listing Added Support for Horizontal Listing Apr 22, 2021
@@ -123,6 +140,16 @@ class DraggableScrollbarState extends State<DraggableScrollbar> with TickerProvi
globalPosition: Offset.zero,
delta: Offset(0, -2),
));
else if (value.logicalKey == LogicalKeyboardKey.arrowRight)
Copy link
Owner

@deakjahn deakjahn Apr 22, 2021

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),

Copy link
Contributor Author

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.

@@ -27,6 +28,7 @@ class DraggableScrollbar extends StatefulWidget {
this.currentFirstIndex = 0,
required this.scrollThumbBuilder,
this.onChange,
required this.scrollDirection
Copy link
Owner

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay.
Changed it.

@deakjahn deakjahn merged commit 93de21f into deakjahn:master Apr 22, 2021
@deakjahn
Copy link
Owner

Thanks.

@deakjahn
Copy link
Owner

deakjahn commented Apr 22, 2021

Also added the same to the Up and Down keys and a few comments to force the dartfmt formatter.

@MohamedRisaldarTA
Copy link
Contributor Author

MohamedRisaldarTA commented May 4, 2021

I am expecting a new version in pub.dev along with this change.

@deakjahn
Copy link
Owner

deakjahn commented May 4, 2021

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?

@deakjahn
Copy link
Owner

deakjahn commented May 4, 2021

Oh, dear me, sorry, I mixed the two PRs. My bad. I'll upload it now. Sorry.

@MohamedRisaldarTA
Copy link
Contributor Author

No worries.
I can understand.
Thanks

deakjahn added a commit that referenced this pull request May 4, 2021
@deakjahn
Copy link
Owner

deakjahn commented May 4, 2021

2.0.2 already there but I should've also changed the README to describe the new functionality. This will also come.

deakjahn added a commit that referenced this pull request May 4, 2021
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

Successfully merging this pull request may close these issues.

2 participants