Repository: flutter
Issue: SubmenuButton overlay not always shown on focused menu buttons on iOS
Labels: platform-ios,framework,P2,customer: quake (g3),team-design,triaged-design

### Steps to reproduce

1. Create a `MenuBar` containing `SubmenuButton` submenus.
2. Override the `MenuButtonTheme` so that the `overlayColor` is a color that contrasts with the theme surface color when the button is focused, and override the `foregroundColor` to be a color that contrasts with that color also when the button is focused.

### Expected results

Since the foreground and overlay colors contrast with one another, and the overlay is shown on the menu when the menu is focused, this should ensure that the text will always be visible.

### Actual results

In fact, the overlay color is not always shown on the menu when the menu is focused.  Specifically, on iOS (and only iOS), when the menu is focused by tapping on it, the overlay is hidden when the touch is removed, even though the menu remains in a focused state.

### Code sample

<details open><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: MyHomePage(title: 'Flutter MenuAnchor Focus Color Reproduction'),
    );
  }
}

class MyHomePage extends StatelessWidget {
  MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  Widget build(BuildContext context) {
    return Theme(
      data: Theme.of(context).copyWith(
        menuButtonTheme: MenuButtonThemeData(
          style: ButtonStyle(
            overlayColor: WidgetStateProperty.resolveWith(
              (Set<WidgetState> states) {
                return states.contains(WidgetState.focused)
                    ? Theme.of(context).colorScheme.primary
                    : Theme.of(context).colorScheme.surface;
              },
            ),
            foregroundColor: WidgetStateProperty.resolveWith(
              (Set<WidgetState> states) {
                return states.contains(WidgetState.focused)
                    ? Theme.of(context).colorScheme.onPrimary
                    : Theme.of(context).colorScheme.onSurface;
              },
            ),
          ),
        ),
      ),
      child: Scaffold(
        appBar: AppBar(
          title: Text(title, style: TextStyle(fontFamily: 'ProductSans')),
          bottom: PreferredSize(
            preferredSize: Size.fromHeight(48.0),
            child: MenuBar(
              children: [
                SubmenuButton(
                  menuChildren: [
                    MenuItemButton(
                      child: Text('New'),
                      onPressed: () => print('New'),
                    ),
                  ],
                  child: Text('File'),
                ),
                SubmenuButton(
                  menuChildren: [
                    MenuItemButton(
                      child: Text('Undo'),
                      onPressed: () => print('Undo'),
                    ),
                  ],
                  child: Text('Edit'),
                ),
              ],
            ),
          ),
        ),
        body: Align(
          alignment: Alignment.topCenter,
          child: Padding(
            padding: const EdgeInsets.symmetric(
              horizontal: 96.0,
              vertical: 24.0,
            ),
            child: Text(
              'On iOS, tap on one of the menus above, and notice that the focus '
              'color of the menu background and text are not in sync.  It will '
              'be correct on any other platform, or if you press tab to focus '
              'the menu.',
            ),
          ),
        ),
      ),
    );
  }
}
```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

![flutter_menuanchor_focus_overlay_color_bug](https://github.com/user-attachments/assets/afd92138-237b-436e-9b02-164a709b4e9a)

</details>


### Logs

N/A

### Flutter Doctor output

N/A