Adjust test/material/popup_menu_test.dart for Dart 2 semantics. (#14644)
This commit is contained in:
parent
b8fcc96265
commit
08db0d83d7
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user