Hide the debug banner in the PopupMenuButton example (#108324)

* Hide the debug banner in the PopupMenuButton example

* Add test to verify that debug banner is not shown
This commit is contained in:
Bryan Oltman 2022-07-26 10:43:35 -04:00 committed by GitHub
parent c8b5d10932
commit e3d08fb6d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -19,6 +19,7 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const MaterialApp(
debugShowCheckedModeBanner: false,
title: _title,
home: MyStatefulWidget(),
);

View File

@ -26,4 +26,9 @@ void main() {
await tester.pumpAndSettle();
expect(find.text('_selectedMenu: itemOne'), findsNothing);
});
testWidgets('Does not show debug banner', (WidgetTester tester) async {
await tester.pumpWidget(const example.MyApp());
expect(find.byType(CheckedModeBanner), findsNothing);
});
}