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

Disabling "All" and "Reset" buttons #24

Closed
guplem opened this issue Jan 13, 2022 · 4 comments
Closed

Disabling "All" and "Reset" buttons #24

guplem opened this issue Jan 13, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@guplem
Copy link

guplem commented Jan 13, 2022

Is your feature request related to a problem? Please describe.
It would be very nice to be able to remove the "all" and "reset" buttons.

Describe the solution you'd like
A parameter in the constructor to allow you to remove the "all" and "reset" buttons if desired. If removed, the "Accept" button should be the only one remaining and could be automatically centred to the bottom middle.

Describe alternatives you've considered
I have tried removing the text from the button (using "resetButtonText" and "allButtonText"), but it's still showing the buttons. Maybe giving an empty string ("") could disable it.

Additional context
I am using the widget as a tag selector while in the creation of elements for my app, and it makes no sense to have the "all" button, I wouldn't want the users to set all the tags to a new element, usually they should add only 2-3.

@TheAlphamerc TheAlphamerc added the enhancement New feature or request label Jan 14, 2022
@TheAlphamerc
Copy link
Owner

@guplem Thanks for the suggestion. I'll add the boolean parameter to hide All and Reset buttons. The new version of the package will be rolled out soon and make sure to read the documentation and Changelog.md before updating the package because the new version of the package will contain some breaking change related to filter dialog theme.

@TheAlphamerc
Copy link
Owner

@guplem I have added a controlButtons parameter in the widget and its type is List<ControlButtonType>.
ControlByttonType is an enum that consists All and Reset.

// Display 'All` button alongside `Apply` button
controlButtons: [ContolButtonType.All]
// Display 'Reset` button alongside `Apply` button
controlButtons: [ContolButtonType.Reset]

If you want to display all buttons (All, Reset, Apply) then don't use controlButtons parameter or pass null value.

@TheAlphamerc
Copy link
Owner

@guplem New version is available on pub.dev. Let me know if you face any issue.

@guplem
Copy link
Author

guplem commented Jan 22, 2022

Thanks for the update!

It seems to work flawlessly, and it has many new features that will be highly appreciated!

The slightly new design is cool too, thank you for your time!

A little more documentation would be helpful, some people not quite familiarized with flutter might struggle to figure all the theme options.

@guplem guplem closed this as completed Jan 22, 2022
softdev55 added a commit to softdev55/flutter_plugin_filter_list that referenced this issue Aug 30, 2022
Seven-112 pushed a commit to Seven-112/flutter_plugin_filter_list that referenced this issue May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants