From dbefd89ca99bc9d76ede719bcc4af0abd4cb1167 Mon Sep 17 00:00:00 2001 From: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com> Date: Sun, 17 Jul 2022 21:38:58 -0700 Subject: [PATCH] Added license headers for M3 demo app (#1328) * Added header for all files Co-authored-by: Qun Cheng --- material_3_demo/lib/color_palettes_screen.dart | 4 ++++ material_3_demo/lib/component_screen.dart | 4 ++++ material_3_demo/lib/elevation_screen.dart | 4 ++++ material_3_demo/lib/main.dart | 4 ++++ material_3_demo/lib/typography_screen.dart | 4 ++++ material_3_demo/test/color_screen_test.dart | 9 ++++++--- material_3_demo/test/component_screen_test.dart | 7 +++++-- material_3_demo/test/elevation_screen_test.dart | 11 +++++++---- material_3_demo/test/typography_screen_test.dart | 11 +++++++---- 9 files changed, 45 insertions(+), 13 deletions(-) diff --git a/material_3_demo/lib/color_palettes_screen.dart b/material_3_demo/lib/color_palettes_screen.dart index e8edb5bce..df67e6ba1 100644 --- a/material_3_demo/lib/color_palettes_screen.dart +++ b/material_3_demo/lib/color_palettes_screen.dart @@ -1,3 +1,7 @@ +// Copyright 2021 The Flutter team. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/material.dart'; const Widget divider = SizedBox(height: 10); diff --git a/material_3_demo/lib/component_screen.dart b/material_3_demo/lib/component_screen.dart index f11237742..3dd190f92 100644 --- a/material_3_demo/lib/component_screen.dart +++ b/material_3_demo/lib/component_screen.dart @@ -1,3 +1,7 @@ +// Copyright 2021 The Flutter team. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/material.dart'; class ComponentScreen extends StatelessWidget { diff --git a/material_3_demo/lib/elevation_screen.dart b/material_3_demo/lib/elevation_screen.dart index bd2a0409d..ea18d5d80 100644 --- a/material_3_demo/lib/elevation_screen.dart +++ b/material_3_demo/lib/elevation_screen.dart @@ -1,3 +1,7 @@ +// Copyright 2021 The Flutter team. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/material.dart'; class ElevationScreen extends StatelessWidget { diff --git a/material_3_demo/lib/main.dart b/material_3_demo/lib/main.dart index 10dfae1f1..2d31ceb7c 100644 --- a/material_3_demo/lib/main.dart +++ b/material_3_demo/lib/main.dart @@ -1,3 +1,7 @@ +// Copyright 2021 The Flutter team. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/material.dart'; import 'color_palettes_screen.dart'; diff --git a/material_3_demo/lib/typography_screen.dart b/material_3_demo/lib/typography_screen.dart index 0f7cec64f..6ffa270da 100644 --- a/material_3_demo/lib/typography_screen.dart +++ b/material_3_demo/lib/typography_screen.dart @@ -1,3 +1,7 @@ +// Copyright 2021 The Flutter team. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/material.dart'; class TypographyScreen extends StatelessWidget { diff --git a/material_3_demo/test/color_screen_test.dart b/material_3_demo/test/color_screen_test.dart index 77e64fdc5..754b18a8a 100644 --- a/material_3_demo/test/color_screen_test.dart +++ b/material_3_demo/test/color_screen_test.dart @@ -1,3 +1,7 @@ +// Copyright 2021 The Flutter team. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + // ignore_for_file: avoid_types_on_closure_parameters import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -29,7 +33,7 @@ void main() { testWidgets( 'Color palettes screen shows correctly when color icon is clicked ' - 'on NavigationRail', (WidgetTester tester) async { + 'on NavigationRail', (tester) async { widgetSetup(tester, 450); // NavigationRail shows only when width is >= 450. addTearDown(tester.binding.window.clearPhysicalSizeTestValue); await tester.pumpWidget(const Material3Demo()); @@ -46,8 +50,7 @@ void main() { expect(find.text("Dark Theme"), findsOneWidget); }); - testWidgets('Color screen shows correct content', - (WidgetTester tester) async { + testWidgets('Color screen shows correct content', (tester) async { await tester.pumpWidget(MaterialApp( home: Scaffold(body: Row(children: const [ColorPalettesScreen()])), )); diff --git a/material_3_demo/test/component_screen_test.dart b/material_3_demo/test/component_screen_test.dart index 45bbbea29..5a573d6e8 100644 --- a/material_3_demo/test/component_screen_test.dart +++ b/material_3_demo/test/component_screen_test.dart @@ -1,3 +1,7 @@ +// Copyright 2021 The Flutter team. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + // ignore_for_file: avoid_types_on_closure_parameters import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -5,8 +9,7 @@ import 'package:material_3_demo/component_screen.dart'; import 'package:material_3_demo/main.dart'; void main() { - testWidgets('Default main page shows all M3 components', - (WidgetTester tester) async { + testWidgets('Default main page shows all M3 components', (tester) async { await tester.pumpWidget(const Material3Demo()); // Elements on the app bar diff --git a/material_3_demo/test/elevation_screen_test.dart b/material_3_demo/test/elevation_screen_test.dart index a17c2d444..8bb892291 100644 --- a/material_3_demo/test/elevation_screen_test.dart +++ b/material_3_demo/test/elevation_screen_test.dart @@ -1,3 +1,7 @@ +// Copyright 2021 The Flutter team. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + // ignore_for_file: avoid_types_on_closure_parameters import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -9,7 +13,7 @@ import 'component_screen_test.dart'; void main() { testWidgets( 'Surface Tones screen shows correctly when the corresponding icon is ' - 'selected on NavigationBar', (WidgetTester tester) async { + 'selected on NavigationBar', (tester) async { widgetSetup(tester, 449); addTearDown(tester.binding.window.clearPhysicalSizeTestValue); await tester.pumpWidget(const Material3Demo()); @@ -27,7 +31,7 @@ void main() { testWidgets( 'Surface Tones screen shows correctly when the corresponding icon is ' - 'selected on NavigationRail', (WidgetTester tester) async { + 'selected on NavigationRail', (tester) async { widgetSetup(tester, 450); // NavigationRail shows only when width is >= 450. addTearDown(tester.binding.window.clearPhysicalSizeTestValue); await tester.pumpWidget(const Material3Demo()); @@ -42,8 +46,7 @@ void main() { expect(find.text("Surface Tint only"), findsOneWidget); }); - testWidgets('Surface Tones screen shows correct content', - (WidgetTester tester) async { + testWidgets('Surface Tones screen shows correct content', (tester) async { await tester.pumpWidget(MaterialApp( home: Scaffold(body: Row(children: const [ElevationScreen()])), )); diff --git a/material_3_demo/test/typography_screen_test.dart b/material_3_demo/test/typography_screen_test.dart index 72450af20..bbf340f47 100644 --- a/material_3_demo/test/typography_screen_test.dart +++ b/material_3_demo/test/typography_screen_test.dart @@ -1,3 +1,7 @@ +// Copyright 2021 The Flutter team. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + // ignore_for_file: avoid_types_on_closure_parameters import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -9,7 +13,7 @@ import 'component_screen_test.dart'; void main() { testWidgets( 'Typography screen shows correctly when the corresponding icon is ' - 'selected on NavigationBar', (WidgetTester tester) async { + 'selected on NavigationBar', (tester) async { widgetSetup(tester, 449); addTearDown(tester.binding.window.clearPhysicalSizeTestValue); await tester.pumpWidget(const Material3Demo()); @@ -27,7 +31,7 @@ void main() { testWidgets( 'Typography screen shows correctly when the corresponding icon is ' - 'selected on NavigationRail', (WidgetTester tester) async { + 'selected on NavigationRail', (tester) async { widgetSetup(tester, 450); // NavigationRail shows only when width is >= 450. addTearDown(tester.binding.window.clearPhysicalSizeTestValue); await tester.pumpWidget(const Material3Demo()); @@ -42,8 +46,7 @@ void main() { expect(find.text("Display Large"), findsOneWidget); }); - testWidgets('Typography screen shows correct content', - (WidgetTester tester) async { + testWidgets('Typography screen shows correct content', (tester) async { await tester.pumpWidget(MaterialApp( home: Scaffold(body: Row(children: const [TypographyScreen()])), ));