title: How to set Flutter showMenu starting point
body: <p>I would like to know how to change the origin point of the <code>popUpMenu</code>, start the popup right above the bottom app bar, no matter the count of items. Aligned to the right end of the screen. Something that is like (for example) </p>
  
  <pre class="lang-dart prettyprint-override"><code>Positioned(right: 0, bottom: bottomAppBarHeight)
  </code></pre>
  
  <p>Here is a screenshot of the design placement of <code>popUpMenu</code> I want to achieve: </p>
  
  <p><a href="https://i.stack.imgur.com/fRUzl.png" rel="noreferrer"><img src="https://i.stack.imgur.com/fRUzl.png" alt="Design"></a></p>
  
  <p>Here is a screenshot of the current placement of the <code>popUpMenu</code> (Please ignore other design differences as they are irrelevant):</p>
  
  <p><a href="https://i.stack.imgur.com/p61D6.png" rel="noreferrer"><img src="https://i.stack.imgur.com/p61D6.png" alt="Actual"></a></p>
  
  <p>The code used is as follows :</p>
  
  <pre class="lang-dart prettyprint-override"><code>                      onPressed: () {
                          final RelativeRect position =
                              buttonMenuPosition(context);
                          showMenu(context: context, position: position, items: [
                            PopupMenuItem&lt;int&gt;(
                              value: 0,
                              child: Text('Working a lot harder'),
                            ),
                            PopupMenuItem&lt;int&gt;(
                              value: 1,
                              child: Text('Working a lot less'),
                            ),
                            PopupMenuItem&lt;int&gt;(
                              value: 1,
                              child: Text('Working a lot smarter'),
                            ),
                          ]);
                        },
  </code></pre>
  
  <p>The <code>buttonMenuPosition</code> function code: </p>
  
  <pre class="lang-dart prettyprint-override"><code>RelativeRect buttonMenuPosition(BuildContext context) {
      final bool isEnglish =
          LocalizedApp.of(context).delegate.currentLocale.languageCode == 'en';
      final RenderBox bar = context.findRenderObject() as RenderBox;
      final RenderBox overlay =
          Overlay.of(context).context.findRenderObject() as RenderBox;
      const Offset offset = Offset.zero;
      final RelativeRect position = RelativeRect.fromRect(
        Rect.fromPoints(
          bar.localToGlobal(
              isEnglish
                  ? bar.size.centerRight(offset)
                  : bar.size.centerLeft(offset),
              ancestor: overlay),
          bar.localToGlobal(
              isEnglish
                  ? bar.size.centerRight(offset)
                  : bar.size.centerLeft(offset),
              ancestor: overlay),
        ),
        offset &amp; overlay.size,
      );
      return position;
    }
  </code></pre>
  
  <p>Changing the offset didn't work.</p>