Repository: flutter
Issue: PopupMenuButton to use (top, right, bottom, left) instead of offset when adjusting menu position
Labels: c: new feature,framework,f: material design,c: proposal,P3,team-design,triaged-design

`PopupMenuButton` uses `offset` to adjust placement of the popup menu. That works in some places like the top bar actions, but for my case I use it on a bottom bar with a runtime generated list, that means that at compile time there is no way to set it at certain offset.

![1](https://user-images.githubusercontent.com/39862612/126493908-328395bd-bd8a-4875-9a8d-d5229c362bf0.jpg)
### Picture 1: An example of the desired behavior, the popup menu does not overlay the bottom bar, because its offset tell it so (it works because the list of popup menu items has fixed size).

---

![2](https://user-images.githubusercontent.com/39862612/126493933-84412e45-12d1-4755-9a3a-b3558923851c.jpg)
### Picture 2: This popup menu has growable list so its size changes and there is no way to set it at a fixed size so it overlays the bottom bar. (undesired behavior)

---

By default the popup menu does not overflow of the screen which is great! But It hides the bottom bar under it. I wish I could pass the offset size from bottom (by for example `50px`) and I wouldn't have to worry about its size and whether it will overlay the bottom bar.

What I suggest is instead of using `offset` to adjust the popup menu position, use the `top`, `right`, `bottom`, `left` attributes.
In the Picture 1, instead of:
```dart
PopupMenuButton(
       offset: const Offset(0, -300), // <-  -300 is because the popup menu size is 250px and I added more 50px to move it above bottombar
       icon: icon,
       itemBuilder: (context) => popupItemsList,
);
```

change it to:
```dart
PopupMenuButton(
       bottom: 50, // <- tells it to move up for 50px
       icon: icon,
       itemBuilder: (context) => popupItemsList,
);
```

This way the issue of overlaying bottom bar presented in Picture 2 which can not be solved using offset can be solved using `bottom: 50`.

I'm making this issue a feature request instead of a buggy widget category because bad but working approaches exist, one way is to make the containing widget that is for my case the bottom bar a `StatefulWidget` and use `setState` when `popupItemsList` changes its size to calculate the new offset, or to create specific widget for that specific popup menu button that also use `setState` to recalculate the new offset.

<details>
<summary>flutter doctor -v</summary>

```sh
[✓] Flutter (Channel stable, 2.2.3, on Linux, locale en_US.UTF-8)
    • Flutter version 2.2.3 at /opt/flutter
    • Framework revision f4abaa0735 (3 weeks ago), 2021-07-01 12:46:11 -0700
    • Engine revision 241c87ad80
    • Dart version 2.13.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /home/dnory0/Android/Sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+0-b944-P17168821)
    • All Android licenses accepted.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.16.3
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[✓] Android Studio (version 4.2)
    • Android Studio at /opt/android-studio
    • Flutter plugin version 58.0.1
    • Dart plugin version 202.8531
    • Java version OpenJDK Runtime Environment (build 11.0.8+0-b944-P17168821)

[✓] IntelliJ IDEA Ultimate Edition (version 2021.1)
    • IntelliJ at /opt/idea
    • Flutter plugin version 58.0.3
    • Dart plugin version 211.7665

[✓] VS Code (version 1.58.1)
    • VS Code at /usr/share/code
    • Flutter extension version 3.24.0

[✓] Connected device (2 available)
    • SM A715F (mobile) • R58N72AE9HP • android-arm64 • Android 10 (API 29)
    • Linux (desktop)   • linux       • linux-x64     • Linux

! Doctor found issues in 1 category.
```
</details>