Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions packages/material_ui/example/lib/app/app.snippet.0.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright 2013 The Flutter Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:material_ui/material_ui.dart';

/// Flutter code sample for [MaterialApp].

void main() {
runApp(const MaterialAppExample());
}

class MaterialAppExample extends StatelessWidget {
const MaterialAppExample({super.key});

@override
Widget build(BuildContext context) {
return
// #region content
MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Home'),
),
),
debugShowCheckedModeBanner: false,
)
// #endregion content
;
}
}
17 changes: 17 additions & 0 deletions packages/material_ui/example/test/app/app.snippet.0_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright 2013 The Flutter Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter_test/flutter_test.dart';
import 'package:material_ui/material_ui.dart';
import 'package:material_ui_examples/app/app.snippet.0.dart' as example;

void main() {
testWidgets('The app is mounted without a checked mode banner', (
WidgetTester tester,
) async {
await tester.pumpWidget(const example.MaterialAppExample());
expect(find.byType(MaterialApp), findsOne);
expect(find.byType(CheckedModeBanner), findsNothing);
});
}
11 changes: 1 addition & 10 deletions packages/material_ui/lib/src/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,7 @@ enum ThemeMode {
///
/// ![The MaterialApp displays a Scaffold ](https://flutter.github.io/assets-for-api-docs/assets/material/basic_material_app.png)
///
/// ```dart
/// MaterialApp(
/// home: Scaffold(
/// appBar: AppBar(
/// title: const Text('Home'),
/// ),
/// ),
/// debugShowCheckedModeBanner: false,
/// )
/// ```
/// {@example /example/lib/app/app.snippet.0.dart#content indent=strip}
///
// TODO(framework): End of the blue example container.
///
Expand Down
Loading