Repository: flutter
Issue: MenuAnchor animations broken after 3.19
Labels: c: regression,framework,a: animation,f: material design,has reproducible steps,P2,team-design,triaged-design,found in release: 3.19,found in release: 3.20

### Steps to reproduce

Making a simple animation for a menu made with MenuAnchor using widgets like AnimatedOpacity() no longer works after 3.19. Downgrading back to 3.16.9 fixes it. Not sure if this is the best way to animate a menu in the first place, but it had been working well for me. I think maybe it has to do with this new change [#130534](https://github.com/flutter/flutter/pull/130534), though I really have no idea. That's just the only thing I noticed explicitly changed about MenuAnchor.

1. Make a MenuAnchor menu that pops up a menu on clicking a button
2. wrap the menuChildren in an animated widget like AnimatedOpacity
3. Make this widget animate a change like opacity based on whether the menu is open/visible or not.
4. The animations do not work, regardless of duration, curve, or type of animation (AnimatedContainer, opacity, crossfade, etc are all broken)



### Expected results

The menu that pops up should be animated. In this case, opacity should fade in.

### Actual results

There is no animation.

### Code sample

```
import 'package:flutter/material.dart';

void main() {
  runApp(const AnimatedMenuAnchor());
}

class AnimatedMenuAnchor extends StatefulWidget {
  const AnimatedMenuAnchor({super.key});

  @override
  State<AnimatedMenuAnchor> createState() => _AnimatedMenuAnchorState();
}

class _AnimatedMenuAnchorState extends State<AnimatedMenuAnchor> {
  bool _visible = false;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: MenuAnchor(
            onClose: () => setState(() {
              _visible = false;
            }),
            onOpen: () => setState(() {
              _visible = true;
            }),
            builder: (BuildContext context, MenuController controller,
                Widget? child) {
              return TextButton(
                onPressed: () {
                  if (controller.isOpen) {
                    controller.close();
                  } else {
                    controller.open();
                  }
                },
                child: const Text('OPEN MENU'),
              );
            },
            menuChildren: <Widget>[
              AnimatedOpacity(
                opacity: _visible ? 1.0 : 0.0,
                duration: const Duration(milliseconds: 500),
                child: Column(
                  children: [
                    MenuItemButton(
                      child: const Text('Option 1'),
                      onPressed: () {},
                    ),
                    MenuItemButton(
                      child: const Text('Option 2'),
                      onPressed: () {},
                    ),
                    MenuItemButton(
                      child: const Text('Option 3'),
                      onPressed: () {},
                    ),
                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

```

### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>


**This is how it looked in 3.16.9:** In 3.19 there is no animation.

https://github.com/flutter/flutter/assets/35315935/eee04aa9-ae03-4482-a1df-ad54d066c04e


To see that it no longer works, you can copy the code into dartpad.

</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

```
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.0, on Ubuntu 23.10 6.5.0-17-generic, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.86.1)
[✓] Connected device (2 available)
[✓] Network resources

• No issues found!
```