diff --git a/packages/devtools_app/lib/src/standalone_ui/ide_shared/property_editor/property_editor_refactors.dart b/packages/devtools_app/lib/src/standalone_ui/ide_shared/property_editor/property_editor_refactors.dart index 12c2e65e79b..e81bcd45529 100644 --- a/packages/devtools_app/lib/src/standalone_ui/ide_shared/property_editor/property_editor_refactors.dart +++ b/packages/devtools_app/lib/src/standalone_ui/ide_shared/property_editor/property_editor_refactors.dart @@ -138,26 +138,34 @@ class _WrapWithOverflowButton extends StatelessWidget { @override Widget build(BuildContext context) { + final theme = Theme.of(context); return DevToolsTooltip( message: 'More widgets...', child: ContextMenuButton( - color: WrapWithRefactors.buttonColor(Theme.of(context)), + color: WrapWithRefactors.buttonColor(theme), icon: Icons.arrow_drop_down, iconSize: WrapWithRefactors.buttonIconSize, buttonWidth: buttonMinWidth, style: _wrapWithButtonStyle, - menuChildren: _refactorOptions(), + menuChildren: _refactorOptions(theme), ), ); } - List _refactorOptions() { + List _refactorOptions(ThemeData theme) { + final colorScheme = theme.colorScheme; return refactors.map((refactor) { return MenuItemButton( - child: Text(refactor.label), + style: MenuItemButton.styleFrom( + foregroundColor: colorScheme.onSurface, + backgroundColor: theme.isDarkTheme + ? colorScheme.surface.brighten() + : colorScheme.surface.darken(), + ), onPressed: () async { await applyRefactor(refactor); }, + child: Text(refactor.label), ); }).toList(); }