Unverified Commit 08db0d83 authored by Vyacheslav Egorov's avatar Vyacheslav Egorov Committed by GitHub

Adjust test/material/popup_menu_test.dart for Dart 2 semantics. (#14644)

parent b8fcc962
......@@ -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<int>' // normal case
|| widgetType == '_PopupMenu'; // for old versions of Dart that don't reify method type arguments
};
Future<Null> openMenu(TextDirection textDirection, Alignment alignment) async {
return TestAsyncUtils.guard(() async {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment