title: How to change the padding in popup menu?
body: <p>How can i remove the padding in <code>PopupMenuButton</code> ? I tried using <code>padding</code> property but it the padding for icons. </p>
  
  <p>but found something in <code>popup_menu.dart</code></p>
  
  <pre><code>const double _kMenuHorizontalPadding = 16.0;
  const double _kMenuDividerHeight = 16.0;
  const double _kMenuMaxWidth = 5.0 * _kMenuWidthStep;
  const double _kMenuMinWidth = 2.0 * _kMenuWidthStep;
  const double _kMenuVerticalPadding = 8.0;
  </code></pre>
  
  <p>Managed to remove horizontal padding, but I don't know how to remove the vertical padding in the popup menu.</p>
  
  <p>Here is the code that i used to remove the horizontal padding.</p>
  
  <pre><code>class AppPopUpMenuState extends PopupMenuItemState&lt;int, AppPopUpButton&gt; {
    @override
    Widget build(BuildContext context) {
      final ThemeData theme = Theme.of(context);
      final PopupMenuThemeData popupMenuTheme = PopupMenuTheme.of(context);
      TextStyle style = widget.textStyle ??
          popupMenuTheme.textStyle ??
          theme.textTheme.subtitle1;
  
      if (!widget.enabled) style = style.copyWith(color: theme.disabledColor);
  
      Widget item = AnimatedDefaultTextStyle(
        style: style,
        duration: kThemeChangeDuration,
        child: Container(
          color: widget.color,
          width: widget.width,
          alignment: Alignment.center,
   //   padding: const EdgeInsets.symmetric(horizontal: _kMenuHorizontalPadding), //padding in library
          padding: widget.padding,  // code that changed
          margin: EdgeInsets.zero,
          constraints: BoxConstraints(minHeight: widget.height),
          child: buildChild(),
        ),
      );
  
      if (!widget.enabled) {
        final bool isDark = theme.brightness == Brightness.dark;
        item = IconTheme.merge(
          data: IconThemeData(opacity: isDark ? 0.5 : 0.38),
          child: item,
        );
      }
  
      return InkWell(
        onTap: widget.enabled ? handleTap : null,
        canRequestFocus: widget.enabled,
        child: item,
      );
    }
  }
  </code></pre>
  
  <p>Code in <code>PopupMenu</code> Library for building menu</p>
  
  <pre><code>class _PopupMenu&lt;T&gt; extends StatelessWidget {
    const _PopupMenu({
      Key key,
      this.route,
      this.semanticLabel,
    }) : super(key: key);
  
    final _PopupMenuRoute&lt;T&gt; route;
    final String semanticLabel;
  
    @override
    Widget build(BuildContext context) {
      final double unit = 1.0 / (route.items.length + 1.5); // 1.0 for the width and 0.5 for the last item's fade.
      final List&lt;Widget&gt; children = &lt;Widget&gt;[];
      final PopupMenuThemeData popupMenuTheme = PopupMenuTheme.of(context);
  
      for (int i = 0; i &lt; route.items.length; i += 1) {
        final double start = (i + 1) * unit;
        final double end = (start + 1.5 * unit).clamp(0.0, 1.0) as double;
        final CurvedAnimation opacity = CurvedAnimation(
          parent: route.animation,
          curve: Interval(start, end),
        );
        Widget item = route.items[i];
        if (route.initialValue != null &amp;&amp; route.items[i].represents(route.initialValue)) {
          item = Container(
            color: Theme.of(context).highlightColor,
            child: item,
          );
        }
        children.add(
          _MenuItem(
            onLayout: (Size size) {
              route.itemSizes[i] = size;
            },
            child: FadeTransition(
              opacity: opacity,
              child: item,
            ),
          ),
        );
      }
  
      final CurveTween opacity = CurveTween(curve: const Interval(0.0, 1.0 / 3.0));
      final CurveTween width = CurveTween(curve: Interval(0.0, unit));
      final CurveTween height = CurveTween(curve: Interval(0.0, unit * route.items.length));
  
      final Widget child = ConstrainedBox(
        constraints: const BoxConstraints(
          minWidth: _kMenuMinWidth,
          maxWidth: _kMenuMaxWidth,
        ),
        child: IntrinsicWidth(
          stepWidth: _kMenuWidthStep,
          child: Semantics(
            scopesRoute: true,
            namesRoute: true,
            explicitChildNodes: true,
            label: semanticLabel,
            child: SingleChildScrollView(
              padding: const EdgeInsets.symmetric(
                vertical: _kMenuVerticalPadding
              ),
              child: ListBody(children: children),
            ),
          ),
        ),
      );
  
      return AnimatedBuilder(
        animation: route.animation,
        builder: (BuildContext context, Widget child) {
          return Opacity(
            opacity: opacity.evaluate(route.animation),
            child: Material(
              shape: route.shape ?? popupMenuTheme.shape,
              color: route.color ?? popupMenuTheme.color,
              type: MaterialType.card,
              elevation: route.elevation ?? popupMenuTheme.elevation ?? 8.0,
              child: Align(
                alignment: AlignmentDirectional.topEnd,
                widthFactor: width.evaluate(route.animation),
                heightFactor: height.evaluate(route.animation),
                child: child,
              ),
            ),
          );
        },
        child: child,
      );
    }
  }
  </code></pre>