From 08db0d83d7da14b0dfea513744d1d8f8287f13da Mon Sep 17 00:00:00 2001 From: Vyacheslav Egorov Date: Thu, 15 Feb 2018 10:31:46 +0100 Subject: [PATCH] Adjust test/material/popup_menu_test.dart for Dart 2 semantics. (#14644) --- packages/flutter/test/material/popup_menu_test.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/flutter/test/material/popup_menu_test.dart b/packages/flutter/test/material/popup_menu_test.dart index 1ee60cdf1c..daedc4d4ed 100644 --- a/packages/flutter/test/material/popup_menu_test.dart +++ b/packages/flutter/test/material/popup_menu_test.dart @@ -215,7 +215,12 @@ void main() { child: const Text('XXX'), ), ); - final WidgetPredicate popupMenu = (Widget widget) => widget.runtimeType.toString() == '_PopupMenu'; + final WidgetPredicate 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 + }; Future openMenu(TextDirection textDirection, Alignment alignment) async { return TestAsyncUtils.guard(() async {