Skip to content

Commit 1016cc6

Browse files
chore(codelabs): remove redundant useMaterial3 flag (#2283)
This PR removes redundant occurrences of `useMaterial3: true` in Flutter codelabs. Since `useMaterial3: true` is now the default, explicitly setting it is unnecessary unless demonstrating its behavior. This change helps keep the sample code clean and aligned with current Flutter defaults. Partial fix for [flutter/flutter#162818](flutter/flutter#162818) ## Pre-launch Checklist - [x] I read the [Effective Dart: Style] _recently_, and have followed its advice. - [x] I signed the [CLA]. - [x] I updated/added relevant documentation (doc comments with `///`). - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-devrel channel on [Discord]. <!-- Links --> [Effective Dart: Style]: https://dart.dev/guides/language/effective-dart/style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md --------- Co-authored-by: Brett Morgan <brett.morgan@gmail.com>
1 parent cb7c4f5 commit 1016cc6

File tree

783 files changed

+6719
-7273
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

783 files changed

+6719
-7273
lines changed

adaptive_app/codelab_rebuild.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,11 +334,9 @@ steps:
334334
title: 'FlutterDev Playlists',
335335
theme: FlexColorScheme.light(
336336
scheme: FlexScheme.red,
337-
useMaterial3: true,
338337
).toTheme,
339338
darkTheme: FlexColorScheme.dark(
340339
scheme: FlexScheme.red,
341-
useMaterial3: true,
342340
).toTheme,
343341
themeMode: ThemeMode.dark, // Or ThemeMode.System if you'd prefer
344342
debugShowCheckedModeBanner: false,
@@ -1586,7 +1584,7 @@ steps:
15861584
+ title: 'Your Playlists',
15871585
theme: FlexColorScheme.light(
15881586
scheme: FlexScheme.red,
1589-
useMaterial3: true,
1587+
).toTheme,
15901588
- name: Patch lib/src/adaptive_playlists.dart
15911589
path: adaptive_app/lib/src/adaptive_playlists.dart
15921590
patch-u: |

adaptive_app/step_03/macos/Runner/Configs/AppInfo.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ PRODUCT_NAME = adaptive_app
1111
PRODUCT_BUNDLE_IDENTIFIER = com.example.adaptiveApp
1212

1313
// The copyright displayed in application information
14-
PRODUCT_COPYRIGHT = Copyright © 2024 com.example. All rights reserved.
14+
PRODUCT_COPYRIGHT = Copyright © 2025 com.example. All rights reserved.

adaptive_app/step_03/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
1919
version: 1.0.0+1
2020

2121
environment:
22-
sdk: ^3.6.0-0
22+
sdk: ^3.6.2
2323

2424
# Dependencies specify other packages that your package needs in order to work.
2525
# To automatically upgrade your package dependencies to the latest versions

adaptive_app/step_03/windows/runner/Runner.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ BEGIN
9393
VALUE "FileDescription", "adaptive_app" "\0"
9494
VALUE "FileVersion", VERSION_AS_STRING "\0"
9595
VALUE "InternalName", "adaptive_app" "\0"
96-
VALUE "LegalCopyright", "Copyright (C) 2024 com.example. All rights reserved." "\0"
96+
VALUE "LegalCopyright", "Copyright (C) 2025 com.example. All rights reserved." "\0"
9797
VALUE "OriginalFilename", "adaptive_app.exe" "\0"
9898
VALUE "ProductName", "adaptive_app" "\0"
9999
VALUE "ProductVersion", VERSION_AS_STRING "\0"

adaptive_app/step_04/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 56 additions & 56 deletions
Large diffs are not rendered by default.

adaptive_app/step_04/lib/main.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,9 @@ class PlaylistsApp extends StatelessWidget {
6767
title: 'FlutterDev Playlists',
6868
theme: FlexColorScheme.light(
6969
scheme: FlexScheme.red,
70-
useMaterial3: true,
7170
).toTheme,
7271
darkTheme: FlexColorScheme.dark(
7372
scheme: FlexScheme.red,
74-
useMaterial3: true,
7573
).toTheme,
7674
themeMode: ThemeMode.dark, // Or ThemeMode.System if you'd prefer
7775
debugShowCheckedModeBanner: false,

adaptive_app/step_04/macos/Runner.xcodeproj/project.pbxproj

Lines changed: 44 additions & 44 deletions
Large diffs are not rendered by default.

adaptive_app/step_04/macos/Runner/Configs/AppInfo.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ PRODUCT_NAME = adaptive_app
1111
PRODUCT_BUNDLE_IDENTIFIER = com.example.adaptiveApp
1212

1313
// The copyright displayed in application information
14-
PRODUCT_COPYRIGHT = Copyright © 2024 com.example. All rights reserved.
14+
PRODUCT_COPYRIGHT = Copyright © 2025 com.example. All rights reserved.

adaptive_app/step_04/pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
1919
version: 1.0.0+1
2020

2121
environment:
22-
sdk: ^3.6.0-0
22+
sdk: ^3.6.2
2323

2424
# Dependencies specify other packages that your package needs in order to work.
2525
# To automatically upgrade your package dependencies to the latest versions
@@ -35,11 +35,11 @@ dependencies:
3535
# Use with the CupertinoIcons class for iOS style icons.
3636
cupertino_icons: ^1.0.8
3737
googleapis: ^13.2.0
38-
http: ^1.2.2
38+
http: ^1.3.0
3939
provider: ^6.1.2
4040
url_launcher: ^6.3.1
41-
flex_color_scheme: ^8.0.0
42-
go_router: ^14.4.1
41+
flex_color_scheme: ^8.1.0
42+
go_router: ^14.7.2
4343

4444
dev_dependencies:
4545
flutter_test:

adaptive_app/step_04/windows/runner/Runner.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ BEGIN
9393
VALUE "FileDescription", "adaptive_app" "\0"
9494
VALUE "FileVersion", VERSION_AS_STRING "\0"
9595
VALUE "InternalName", "adaptive_app" "\0"
96-
VALUE "LegalCopyright", "Copyright (C) 2024 com.example. All rights reserved." "\0"
96+
VALUE "LegalCopyright", "Copyright (C) 2025 com.example. All rights reserved." "\0"
9797
VALUE "OriginalFilename", "adaptive_app.exe" "\0"
9898
VALUE "ProductName", "adaptive_app" "\0"
9999
VALUE "ProductVersion", VERSION_AS_STRING "\0"

0 commit comments

Comments
 (0)