Skip to content

Commit e3d08fb

Browse files
authored
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
1 parent c8b5d10 commit e3d08fb

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

examples/api/lib/material/popupmenu/popupmenu.0.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class MyApp extends StatelessWidget {
1919
@override
2020
Widget build(BuildContext context) {
2121
return const MaterialApp(
22+
debugShowCheckedModeBanner: false,
2223
title: _title,
2324
home: MyStatefulWidget(),
2425
);

examples/api/test/material/popupmenu/popupmenu.0.test.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,9 @@ void main() {
2626
await tester.pumpAndSettle();
2727
expect(find.text('_selectedMenu: itemOne'), findsNothing);
2828
});
29+
30+
testWidgets('Does not show debug banner', (WidgetTester tester) async {
31+
await tester.pumpWidget(const example.MyApp());
32+
expect(find.byType(CheckedModeBanner), findsNothing);
33+
});
2934
}

0 commit comments

Comments
 (0)