maheshj01 / searchfield

A highly customizable simple and easy to use flutter Widget to add a searchfield to your Flutter Application.This Widget allows you to search and select from list of suggestions.
MIT License
84 stars 63 forks source link

[Proposal] Expose Scrollbar customization from RawScrollbar to Searchfield #99

Closed LincolnJota closed 1 year ago

LincolnJota commented 1 year ago

Is your feature request related to a problem? Please describe. I was disappointed, as a package as good as this one can't change the color of the scrollbar thumb, but it can change its visibility. I noticed that in the code there is a RawScrollbar that has the ThumbColor property, and by default it doesn't follow the theme, its default color is a fixed color, as it says here in the official documentation: https://api.flutter.dev/flutter/widgets/RawScrollbar/thumbColor.html

Describe the solution you'd like I'd like to move that property from the RawScrollbar widget to the SearchField widget.

maheshj01 commented 1 year ago

Hello @LincolnJota, Thanks for filing the issue. Scrollbars definitely needs customization.

maheshj01 commented 1 year ago

Closing as fixed in https://github.com/maheshmnj/searchfield/pull/101 available in the new release v0.8.5

LincolnJota commented 1 year ago

Great, @maheshmnj ! But we still have a problem. The scroll bar shows two scroll bars, correct? I think you get the idea. To fix this scroll bar, you need to hide scrolling from the ListView, I did it here and it worked fine.

You can fix it like this:

in this line you can wrap the ListView to look like this:

child: RawScrollbar(
    // other configs....
    child: ScrollConfiguration(
      behavior: ScrollConfiguration.of(context).copyWith(scrollbars: false),
      child: listView,
    ),
),

That way, we're left with only the scroll we need. Hugs!

maheshj01 commented 1 year ago

Oh yes, that should be an easy fix.

maheshj01 commented 1 year ago

fixed in https://github.com/maheshmnj/searchfield/pull/102 available in v0.8.6