diff --git a/packages/flutter/test/material/popup_menu_test.dart b/packages/flutter/test/material/popup_menu_test.dart index 6d4ddde2f2..3a1a76d546 100644 --- a/packages/flutter/test/material/popup_menu_test.dart +++ b/packages/flutter/test/material/popup_menu_test.dart @@ -676,12 +676,8 @@ void main() { child: Text('XXX'), ), ); - bool popupMenu(Widget widget) { - final String widgetType = widget.runtimeType.toString(); - // TODO(mraleph): Remove the old case below. - return widgetType == '_PopupMenu' // normal case - || widgetType == '_PopupMenu'; // for old versions of Dart that don't reify method type arguments - } + + bool popupMenu(Widget widget) => widget.runtimeType.toString() == '_PopupMenu'; Future openMenu(TextDirection textDirection, Alignment alignment) async { return TestAsyncUtils.guard(() async {