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:
@@ -19,6 +19,7 @@ class MyApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const MaterialApp(
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: _title,
|
||||
home: MyStatefulWidget(),
|
||||
);
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user