Skip to content

Commit

Permalink
Hide the debug banner in the PopupMenuButton example (#108324)
Browse files Browse the repository at this point in the history
* Hide the debug banner in the PopupMenuButton example

* Add test to verify that debug banner is not shown
  • Loading branch information
bryanoltman authored Jul 26, 2022
1 parent c8b5d10 commit e3d08fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/api/lib/material/popupmenu/popupmenu.0.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const MaterialApp(
debugShowCheckedModeBanner: false,
title: _title,
home: MyStatefulWidget(),
);
Expand Down
5 changes: 5 additions & 0 deletions examples/api/test/material/popupmenu/popupmenu.0.test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
}

0 comments on commit e3d08fb

Please sign in to comment.