Repository: flutter
Issue: PopupMenuButton isn't aligned correctly when initialValue isn't null.
Labels: framework,f: material design,has reproducible steps,found in release: 3.3,has partial patch,found in release: 3.6,team-design,triaged-design

The alignment of the PopupMenuButton changes based on whether the InitialValue attribute is set to a non-null value.

When initialValue is null, the position of the overlay is exactly on top of the popupMenuButton. When initialValue is set to a value, the overlay is above the popupMenuButton + so extra amount.


<details>
<summary>Video before the fix:</summary>

https://user-images.githubusercontent.com/73116038/202327937-32b36186-3ce7-4169-9fb8-654c4c5f31f3.mp4


</details>

<details>
<summary>Video after the fix</summary>

https://user-images.githubusercontent.com/73116038/202328078-1677e12b-1fa1-4a94-93b2-a679a9103a79.mp4


</details>

<details>

<summary>Reproducible code:</summary>

```

import 'package:flutter/material.dart';

// This is the type used by the popup menu below.
enum Menu { itemOne, itemTwo, itemThree, itemFour }

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  static const String _title = 'Flutter Code Sample';

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: _title,
      home: MyStatefulWidget(),
    );
  }
}

class MyStatefulWidget extends StatefulWidget {
  const MyStatefulWidget({super.key});

  @override
  State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
}

class _MyStatefulWidgetState extends State<MyStatefulWidget> {
  String _selectedMenu = '';

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
      ),
      body: Column(
        children: [
          Row(
            children: [
              PopupMenuButton<Menu>(
                // Callback that sets the selected popup menu item.
                  onSelected: (Menu item) {
                    setState(() {
                      _selectedMenu = item.name;
                    });
                  },
                  itemBuilder: (BuildContext context) => <PopupMenuEntry<Menu>>[
                    const PopupMenuItem<Menu>(
                      value: Menu.itemOne,
                      child: Text('Item 1'),
                    ),
                    const PopupMenuItem<Menu>(
                      value: Menu.itemTwo,
                      child: Text('Item 2'),
                    ),
                    const PopupMenuItem<Menu>(
                      value: Menu.itemThree,
                      child: Text('Item 3'),
                    ),
                    const PopupMenuItem<Menu>(
                      value: Menu.itemFour,
                      child: Text('Item 4'),
                    ),
                  ]),

              SizedBox(width: 100),

              PopupMenuButton<Menu>(
                // Callback that sets the selected popup menu item.
                initialValue: Menu.itemOne,
                  onSelected: (Menu item) {
                    setState(() {
                      _selectedMenu = item.name;
                    });
                  },
                  itemBuilder: (BuildContext context) => <PopupMenuEntry<Menu>>[
                    const PopupMenuItem<Menu>(
                      value: Menu.itemOne,
                      child: Text('Item 1'),
                    ),
                    const PopupMenuItem<Menu>(
                      value: Menu.itemTwo,
                      child: Text('Item 2'),
                    ),
                    const PopupMenuItem<Menu>(
                      value: Menu.itemThree,
                      child: Text('Item 3'),
                    ),
                    const PopupMenuItem<Menu>(
                      value: Menu.itemFour,
                      child: Text('Item 4'),
                    ),
                  ]),
            ],
          ),
          Text('_selectedMenu: $_selectedMenu'),
        ],
      ),
    );
  }
}

```
</details>

I am on the master channel