samedi 19 octobre 2019

Tapping the overflow menu in a Flutter test

How do I tap on the overflow menu in a Flutter test, doing so in a way that works for both Material apps and Cupertino apps? The icon differs between iOS and Android, so I can't just find the icon type.

From the PopupMenuButton docs:

If both [child and icon] are null, then a standard overflow icon is created (depending on the platform).

This is analogous to pressing the platform-dependent icon for going back to the previous screen. The WidgetTester class includes the pageBack() method for this purpose, so I would have expected the class to also include a method for selecting the overflow menu, but I see no such method.

Aucun commentaire:

Enregistrer un commentaire