Skip to content

Padding around the Choice widget #10

Answered by davigmacode
aro-wolo asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, you can create a custom anchorBuilder that can be combined with predefined builder

PromptedChoice<String>.multiple(
  title: 'Category',
  clearable: true,
  value: multipleSelected,
  onChanged: setMultipleSelected,
  itemCount: choices.length,
  itemBuilder: (state, i) {
    return CheckboxListTile(
      value: state.selected(choices[i]),
      onChanged: state.onSelected(choices[i]),
      title: ChoiceText(
        choices[i],
        highlight: state.search?.value,
      ),
    );
  },
  anchorBuilder: (state, openModal) {
    return ListTileTheme(
      data: const ListTileThemeData(
        contentPadding: EdgeInsets.symmetric(
          vertical: 0,
          horizontal: …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@aro-wolo
Comment options

Answer selected by aro-wolo
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
Converted from issue

This discussion was converted from issue #9 on March 07, 2024 05:26.