0

Using package:multiselect/multiselect.dart : multiselect

The menu is too big. I want to set MaxHeight for my Menu without migrating to new widgets.Couldnt find any way to do it.

Example code:

                    DropDownMultiSelect<Role>(
                              options: List.from(state.rolesList ?? []),
                              selectedValues: List.from(state.selectedRoles),
                              hintStyle: const TextStyle(
                                fontSize: 16,
                                color: AppColors.gray900Color,
                                fontWeight: FontWeight.w400,
                              ),
                              onChanged: (value) {

                              },
                              menuItembuilder: (option) {
                                return ....
                              },
                              childBuilder: (selectedValues) {
                                return ....
                              },
                              icon: const Icon(Icons.keyboard_arrow_down),
                              decoration: StylesHelper.adminInputDecoration,
                              whenEmpty: 'selectRole'.tr(),
                            ),

Thanks for everyone who tries to help .

2
  • can you wrap it with a SizedBox and provide some hight? Commented Dec 16, 2024 at 13:20
  • Only changes the width of the button not the whole menu. You can test it with a random minmal app. Commented Dec 16, 2024 at 20:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.