title: How to indent between DropdownButton and DropdownMenuItem in flutter
body: <p>I am using <code>DropdownButton</code> and I am facing the following error. When opening the <code>DropdownMenuItem</code> list, I do not have an indent from the button itself. That is, I need to get the <code>padding</code> between the button (DropdownButton) and the dropdown list (DropdownMenuItem) so that there is a distance. But so far I haven't been able to do it. How can you make an indent between them?</p>
  <p><strong>code</strong></p>
  <pre><code>@override
    Widget build(BuildContext context) {
      return SizedBox(
        width: widget.width,
        child: DropdownButtonHideUnderline(
          child: DropdownButton2(
            items: List.generate(
              widget.items.length,
              (index) =&gt; DropdownMenuItem&lt;String&gt;(
                value: widget.items[index],
                child: Container(
                  decoration: BoxDecoration(
                    border: Border(
                      bottom: BorderSide(
                        color: Colors.white.withOpacity(0.1),
                        width: 1,
                      ),
                    ),
                  ),
                  child: StatefulBuilder(
                    builder: (context, setStateSB) =&gt; GFCheckboxListTile(
                      value: _selectedTitles.contains(widget.items[index]),
                      onChanged: (bool selected) {
                        _onItemSelect(selected, index);
                        setStateSB(() {});
                      },
                      selected: selected,
                      title: Text(
                        widget.items[index],
                        style: constants.Styles.smallTextStyleWhite,
                      ),
                      padding: const EdgeInsets.only(top: 12, bottom: 13),
                      margin: const EdgeInsets.only(right: 0, left: 0),
                      size: 22,
                      activeBgColor: constants.Colors.greyCheckbox,
                      activeBorderColor: constants.Colors.greyXMiddle,
                      inactiveBgColor: constants.Colors.greyCheckbox,
                      activeIcon: SvgPicture.asset(constants.Assets.checkboxIcon),
                      inactiveBorderColor: constants.Colors.greyXMiddle,
                      type: type,
                    ),
                  ),
                ),
              ),
            ),
            hint: _selectedTitles.length &gt; 1
                ? const Text('Selecte EV',
                    style: constants.Styles.bigBookTextStyleWhite)
                : Text(_selectedTitles.join().toString(),
                    style: constants.Styles.bigBookTextStyleWhite),
            value: selectedValue,
            onChanged: (value) {
              setState(() {
                selectedValue = value as String;
              });
            },
            icon: SvgPicture.asset(constants.Assets.arrowDropdown),
            iconSize: 21,
            buttonHeight: 27,
            itemHeight: 47,
            dropdownMaxHeight: 185,
            dropdownWidth: 140,
            dropdownDecoration: BoxDecoration(
                borderRadius: BorderRadius.circular(8),
                border: Border.all(
                  color: constants.Colors.purpleMain,
                ),
                color: constants.Colors.greyDark),
            selectedItemBuilder: (context) {
              return widget.items.map(
                (item) {
                  return Row(
                    children: [
                      widget.icon ?? const SizedBox(),
                      const SizedBox(width: 8),
                      Text(
                        item,
                        style: constants.Styles.bigBookTextStyleWhite,
                      ),
                    ],
                  );
                },
              ).toList();
            },
          ),
        ),
      );
    }
  }
  </code></pre>