multiselect-dropdown icon indicating copy to clipboard operation
multiselect-dropdown copied to clipboard

How to get rid of the space at the top of the dropdown list?

Open TheFe91 opened this issue 1 year ago • 2 comments

As per title, I can't get why there's a big gap at the beginning of the list and how can I get rid of it

Screenshot 2024-08-09 alle 10 39 37

TheFe91 avatar Aug 09 '24 08:08 TheFe91

any solution?

pipe0919 avatar Aug 16 '24 05:08 pipe0919

Wrapping ListView widget inside _DropDown widget into MediaQuery.removePadding fixes the issue

Flexible(
  child: MediaQuery.removePadding(
    context: context,
    removeTop: true,
    removeBottom: true,
    removeLeft: true,
    removeRight: true,
    child: ListView.separated(
      separatorBuilder: (_, __) =>
          itemSeparator ?? const SizedBox.shrink(),
      shrinkWrap: true,
      itemCount: items.length,
      itemBuilder: (_, int index) => _buildOption(index, theme),
    ),
  ),
),

@oi-narendra I have create a PR, could you please have a look?

Rabia-Abismail avatar Mar 25 '25 15:03 Rabia-Abismail