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

How to use this itemBuilder to decorate the items in the dropdown to decorate the dropdown items? #192

Open
ramanatnetsmartz opened this issue Mar 18, 2025 · 1 comment

Comments

@ramanatnetsmartz
Copy link

Details:
multi_dropdown: ^3.0.1
Flutter (Channel stable, 3.24.5, on macOS 15.3.1 24D70 darwin-arm64, locale en-IN)

Requirement - Need to style the options text ie the items in the dropdown.

How to use this property itemBuilder?
Not enought documentation to use it.

/// The builder for the dropdown items.
final DropdownItemBuilder? itemBuilder;

@simran-sheen
Copy link

The itemBuilder function has these parameters: DropdownItem<T> option, int index, void Function() select

itemBuilder: (DropdownItem<T> option, int index, void Function() select) {
  return ListTile(
    title: Text(option.label),
    onTap: select,
  );
}

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

No branches or pull requests

2 participants