Skip to content

change items in button and trailing icon #16

Answered by davigmacode
Raween asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for the kind words about the plugin! I'm glad you're finding it useful.

Here's how you can customize the PromptedChoice widget to achieve what you want:

Understanding anchorBuilder:

The anchorBuilder property in PromptedChoice provides a powerful way to control how the selected items are displayed. It's a function that takes two arguments:

anchorBuilder: (
  // This object holds information about the current selection state, including the selected values.
  ChoiceController<T> state, 
  // This is a function you can call to trigger the opening of the choice selection modal.
  VoidCallback openModal
) {
  final List<T> selectedValues = state.value;
  return InkWell(
    onPressed: o…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Raween
Comment options

Answer selected by Raween
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants