From e3d08fb6d325d778fe6bd02893356c30868789fb Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Tue, 26 Jul 2022 10:43:35 -0400 Subject: [PATCH] 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 --- examples/api/lib/material/popupmenu/popupmenu.0.dart | 1 + examples/api/test/material/popupmenu/popupmenu.0.test.dart | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/examples/api/lib/material/popupmenu/popupmenu.0.dart b/examples/api/lib/material/popupmenu/popupmenu.0.dart index 7aa1645f6a6..a519826e83d 100644 --- a/examples/api/lib/material/popupmenu/popupmenu.0.dart +++ b/examples/api/lib/material/popupmenu/popupmenu.0.dart @@ -19,6 +19,7 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return const MaterialApp( + debugShowCheckedModeBanner: false, title: _title, home: MyStatefulWidget(), ); diff --git a/examples/api/test/material/popupmenu/popupmenu.0.test.dart b/examples/api/test/material/popupmenu/popupmenu.0.test.dart index a075fdcac46..c8a813b44ef 100644 --- a/examples/api/test/material/popupmenu/popupmenu.0.test.dart +++ b/examples/api/test/material/popupmenu/popupmenu.0.test.dart @@ -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); + }); }