[go: nahoru, domu]

Skip to content

Commit

Permalink
Fixed ThemeData in the Flutter Samples unnecessarily includes useMate…
Browse files Browse the repository at this point in the history
…rial3 = true (Issue #2214) (#2217)
  • Loading branch information
sasanktumpati committed Mar 20, 2024
1 parent 25686cf commit 0e13558
Show file tree
Hide file tree
Showing 37 changed files with 10 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ class MyApp extends StatelessWidget {
title: 'Flutter Module Title',
theme: ThemeData(
colorSchemeSeed: Colors.blue,
useMaterial3: true,
),
routes: {
'/': (context) => const FullScreenView(),
Expand Down
1 change: 0 additions & 1 deletion add_to_app/books/flutter_module_books/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class MyApp extends StatelessWidget {
return MaterialApp(
theme: ThemeData(
primaryColor: const Color(0xff6200ee),
useMaterial3: true,
),
home: const BookDetail(),
);
Expand Down
2 changes: 1 addition & 1 deletion add_to_app/fullscreen/flutter_module/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Module Title',
theme: ThemeData.light(useMaterial3: true),
theme: ThemeData.light(),
routes: {
'/': (context) => const FullScreenView(),
'/mini': (context) => const Contents(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class MyApp extends StatelessWidget {
title: 'Flutter Demo',
theme: ThemeData(
colorSchemeSeed: color,
useMaterial3: true,
appBarTheme: AppBarTheme(
backgroundColor: color,
foregroundColor: Colors.white,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Module Title',
theme: ThemeData.light(useMaterial3: true),
theme: ThemeData.light(),
routes: {
'/': (context) => const FullScreenView(),
'/mini': (context) => const Contents(),
Expand Down
2 changes: 1 addition & 1 deletion add_to_app/prebuilt_module/flutter_module/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Module Title',
theme: ThemeData.light(useMaterial3: true),
theme: ThemeData.light(),
routes: {
'/': (context) => const FullScreenView(),
'/mini': (context) => const Contents(),
Expand Down
1 change: 0 additions & 1 deletion android_splash_screen/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class MyApp extends StatelessWidget {
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
useMaterial3: true,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
Expand Down
1 change: 0 additions & 1 deletion animations/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ class AnimationSamples extends StatelessWidget {
title: 'Animation Samples',
theme: ThemeData(
colorSchemeSeed: Colors.deepPurple,
useMaterial3: true,
),
routerConfig: router,
);
Expand Down
1 change: 0 additions & 1 deletion background_isolate_channels/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class MyApp extends StatelessWidget {
title: 'Background Isolate Channels',
theme: ThemeData(
primarySwatch: Colors.blue,
useMaterial3: true,
),
home: const MyHomePage(title: 'Background Isolate Channels'),
);
Expand Down
1 change: 0 additions & 1 deletion code_sharing/client/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class MyApp extends StatelessWidget {
title: 'Flutter Demo',
theme: ThemeData(
colorSchemeSeed: Colors.blue,
useMaterial3: true,
),
home: MyHomePage(
title: 'Flutter Demo Home Page',
Expand Down
1 change: 0 additions & 1 deletion context_menus/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ class _MyAppState extends State<MyApp> {
theme: ThemeData(
primarySwatch: Colors.blue,
platform: defaultTargetPlatform,
useMaterial3: true,
),
initialRoute: '/',
routes: <String, Widget Function(BuildContext)>{
Expand Down
2 changes: 1 addition & 1 deletion deeplink_store_example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp.router(
debugShowCheckedModeBanner: false,
theme: ThemeData.light(useMaterial3: true),
theme: ThemeData.light(),
routerConfig: GoRouter(
routes: [
GoRoute(
Expand Down
1 change: 0 additions & 1 deletion desktop_photo_search/material/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ class UnsplashSearchApp extends StatelessWidget {
title: 'Photo Search',
theme: ThemeData(
colorSchemeSeed: Colors.orange,
useMaterial3: true,
),
home: const UnsplashHomePage(title: 'Photo Search'),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData.light(useMaterial3: true),
theme: ThemeData.light(),
home: const HomePage(),
);
}
Expand Down
2 changes: 1 addition & 1 deletion experimental/linting_tool/lib/theme/app_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:linting_tool/theme/colors.dart';

abstract class AppTheme {
static ThemeData buildReplyLightTheme(BuildContext context) {
final base = ThemeData.light(useMaterial3: true);
final base = ThemeData.light();
return base.copyWith(
bottomSheetTheme: BottomSheetThemeData(
backgroundColor: AppColors.blue700,
Expand Down
1 change: 0 additions & 1 deletion experimental/pedometer/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class MyApp extends StatelessWidget {
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
useMaterial3: true,
),
home: const Home(),
);
Expand Down
1 change: 0 additions & 1 deletion experimental/varfont_shader_puzzle/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class TypePuzzle extends StatelessWidget {
title: 'Type Jam',
theme: ThemeData(
primarySwatch: Colors.grey,
useMaterial3: true,
),
home: const Scaffold(
appBar: null,
Expand Down
2 changes: 1 addition & 1 deletion experimental/web_dashboard/lib/src/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class _DashboardAppState extends State<DashboardApp> {
return Provider.value(
value: _appState,
child: MaterialApp(
theme: ThemeData.light(useMaterial3: true),
theme: ThemeData.light(),
home: SignInSwitcher(
appState: _appState,
apiBuilder: widget.apiBuilder,
Expand Down
1 change: 0 additions & 1 deletion flutter_maps_firestore/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class App extends StatelessWidget {
theme: ThemeData(
colorSchemeSeed: Colors.pink,
scaffoldBackgroundColor: Colors.pink[50],
useMaterial3: true,
),
);
}
Expand Down
1 change: 0 additions & 1 deletion form_app/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ class FormApp extends StatelessWidget {
title: 'Form Samples',
theme: ThemeData(
colorSchemeSeed: Colors.teal,
useMaterial3: true,
),
routerConfig: router,
);
Expand Down
1 change: 0 additions & 1 deletion game_template/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ class MyApp extends StatelessWidget {
color: palette.ink,
),
),
useMaterial3: true,
),
routeInformationProvider: _router.routeInformationProvider,
routeInformationParser: _router.routeInformationParser,
Expand Down
1 change: 0 additions & 1 deletion google_maps/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class _MyAppState extends State<MyApp> {
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.green,
useMaterial3: true,
),
home: Scaffold(
appBar: AppBar(
Expand Down
2 changes: 1 addition & 1 deletion infinite_list/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class MyApp extends StatelessWidget {
create: (context) => Catalog(),
child: MaterialApp(
title: 'Infinite List Sample',
theme: ThemeData.light(useMaterial3: true),
theme: ThemeData.light(),
home: const MyHomePage(),
),
);
Expand Down
2 changes: 1 addition & 1 deletion isolate_example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData.light(useMaterial3: true),
theme: ThemeData.light(),
home: DefaultTabController(
length: 3,
child: Scaffold(
Expand Down
1 change: 0 additions & 1 deletion place_tracker/lib/place_tracker_app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class PlaceTrackerApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp.router(
theme: ThemeData(
useMaterial3: true,
colorSchemeSeed: Colors.green,
appBarTheme: AppBarTheme(
backgroundColor: Colors.green[700],
Expand Down
1 change: 0 additions & 1 deletion platform_channels/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class PlatformChannelSample extends StatelessWidget {
snackBarTheme: SnackBarThemeData(
backgroundColor: Colors.blue[500],
),
useMaterial3: true,
),
routerConfig: router(),
);
Expand Down
1 change: 0 additions & 1 deletion platform_design/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class MyAdaptingApp extends StatelessWidget {
theme: ThemeData(
// Use the green theme for Material widgets.
primarySwatch: Colors.green,
useMaterial3: true,
),
darkTheme: ThemeData.dark(),
builder: (context, child) {
Expand Down
1 change: 0 additions & 1 deletion platform_view_swift/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class PlatformView extends StatelessWidget {
title: 'Platform View',
theme: ThemeData(
primarySwatch: Colors.grey,
useMaterial3: true,
),
home: const HomePage(),
);
Expand Down
1 change: 0 additions & 1 deletion provider_counter/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ class MyApp extends StatelessWidget {
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
useMaterial3: true,
),
home: const MyHomePage(),
);
Expand Down
1 change: 0 additions & 1 deletion provider_shopper/lib/common/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import 'package:flutter/material.dart';

final appTheme = ThemeData(
colorSchemeSeed: Colors.yellow,
useMaterial3: true,
textTheme: const TextTheme(
displayLarge: TextStyle(
fontFamily: 'Corben',
Expand Down
1 change: 0 additions & 1 deletion simple_shader/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class MyApp extends StatelessWidget {
title: 'Simple Shader Demo',
theme: ThemeData(
colorSchemeSeed: Colors.blue,
useMaterial3: true,
),
home: const MyHomePage(),
);
Expand Down
2 changes: 1 addition & 1 deletion simplistic_calculator/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ class CalculatorApp extends ConsumerWidget {

return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData.light(useMaterial3: true),
theme: ThemeData.light(),
home: Scaffold(
body: Container(
color: Colors.white,
Expand Down
1 change: 0 additions & 1 deletion simplistic_editor/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class MyApp extends StatelessWidget {
title: 'Simplistic Editor',
theme: ThemeData(
primarySwatch: Colors.blue,
useMaterial3: true,
),
home: const MyHomePage(title: 'Simplistic Editor'),
),
Expand Down
1 change: 0 additions & 1 deletion testing_app/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ class TestingApp extends StatelessWidget {
theme: ThemeData(
colorSchemeSeed: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
useMaterial3: true,
),
routerConfig: router(),
),
Expand Down
1 change: 0 additions & 1 deletion web/_packages/web_startup_analyzer/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class WebStartupAnalyzerSample extends StatelessWidget {
title: 'Flutter web app timing',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.green.shade100),
useMaterial3: true,
),
home: WebStartupAnalyzerScreen(analyzer: analyzer),
);
Expand Down
1 change: 0 additions & 1 deletion web_embedding/element_embedding_demo/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class _MyAppState extends State<MyApp> {
title: 'Element embedding',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue),
useMaterial3: true,
),
debugShowCheckedModeBanner: false,
home: demoScreenRouter(_currentDemoScreen),
Expand Down
1 change: 0 additions & 1 deletion web_embedding/ng-flutter/flutter/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class _MyAppState extends State<MyApp> {
title: 'Element embedding',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue),
useMaterial3: true,
),
home: ValueListenableBuilder<DemoScreen>(
valueListenable: _screen,
Expand Down

0 comments on commit 0e13558

Please sign in to comment.