Skip to content

Commit 797a3a3

Browse files
Update boring to beautiful (#2320)
Code tidyup. Fixes: flutter/flutter#140702 ## 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 `///`). - [x] 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
1 parent 710bec4 commit 797a3a3

File tree

90 files changed

+1077
-1290
lines changed

Some content is hidden

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

90 files changed

+1077
-1290
lines changed

boring_to_beautiful/codelab_rebuild.yaml

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

boring_to_beautiful/final/android/app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ plugins {
88
android {
99
namespace = "com.example.myartist"
1010
compileSdk = flutter.compileSdkVersion
11-
ndkVersion = flutter.ndkVersion
11+
ndkVersion = "27.0.12077973"
1212

1313
compileOptions {
1414
sourceCompatibility = JavaVersion.VERSION_11

boring_to_beautiful/final/ios/Runner.xcodeproj/project.pbxproj

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

boring_to_beautiful/final/lib/src/shared/providers/theme.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ class ThemeProvider extends InheritedWidget {
6060

6161
Color blend(Color targetColor) {
6262
return Color(
63-
// ignore: deprecated_member_use
64-
Blend.harmonize(targetColor.value, settings.value.sourceColor.value),
63+
Blend.harmonize(
64+
targetColor.toARGB32(),
65+
settings.value.sourceColor.toARGB32(),
66+
),
6567
);
6668
}
6769

@@ -208,7 +210,6 @@ Color randomColor() {
208210
return Color(Random().nextInt(0xFFFFFFFF));
209211
}
210212

211-
// Custom Colors
212213
const linkColor = CustomColor(name: 'Link Color', color: Color(0xFF00B0FF));
213214

214215
class CustomColor {

boring_to_beautiful/final/lib/src/shared/router.dart

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ class NavigationDestination {
4949

5050
final appRouter = GoRouter(
5151
routes: [
52-
// HomeScreen
5352
GoRoute(
5453
path: '/',
5554
pageBuilder: (context, state) => const MaterialPage<void>(
@@ -61,8 +60,6 @@ final appRouter = GoRouter(
6160
),
6261
),
6362
),
64-
65-
// PlaylistHomeScreen
6663
GoRoute(
6764
path: '/playlists',
6865
pageBuilder: (context, state) => const MaterialPage<void>(
@@ -91,8 +88,6 @@ final appRouter = GoRouter(
9188
),
9289
],
9390
),
94-
95-
// ArtistHomeScreen
9691
GoRoute(
9792
path: '/artists',
9893
pageBuilder: (context, state) => const MaterialPage<void>(
@@ -118,9 +113,6 @@ final appRouter = GoRouter(
118113
),
119114
),
120115
),
121-
// builder: (context, state) => ArtistScreen(
122-
// id: state.params['aid']!,
123-
// ),
124116
),
125117
],
126118
),

boring_to_beautiful/final/lib/src/shared/views/adaptive_navigation.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class AdaptiveNavigation extends StatelessWidget {
2222
Widget build(BuildContext context) {
2323
return LayoutBuilder(
2424
builder: (context, dimens) {
25-
// Tablet Layout
2625
if (dimens.maxWidth >= 600) {
2726
return Scaffold(
2827
body: Row(

boring_to_beautiful/final/lib/src/shared/views/image_tile.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class ImageTile extends StatelessWidget {
5151
child: Text(
5252
subtitle,
5353
overflow: TextOverflow.ellipsis,
54-
style: context.labelSmall,
54+
style: context.labelSmall!.copyWith(fontSize: 10),
5555
maxLines: 2,
5656
textAlign: TextAlign.center,
5757
),

boring_to_beautiful/final/macos/Runner.xcodeproj/project.pbxproj

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

boring_to_beautiful/final/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ publish_to: 'none'
44
version: 0.1.0
55

66
environment:
7-
sdk: ^3.8.0
7+
sdk: ^3.8.1
88

99
dependencies:
1010
flutter:
@@ -29,7 +29,7 @@ dependencies:
2929
dev_dependencies:
3030
flutter_test:
3131
sdk: flutter
32-
flutter_lints: ^5.0.0
32+
flutter_lints: ^6.0.0
3333
build_runner: ^2.4.15
3434
freezed: ^3.0.6
3535

boring_to_beautiful/step_01/android/app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ plugins {
88
android {
99
namespace = "com.example.myartist"
1010
compileSdk = flutter.compileSdkVersion
11-
ndkVersion = flutter.ndkVersion
11+
ndkVersion = "27.0.12077973"
1212

1313
compileOptions {
1414
sourceCompatibility = JavaVersion.VERSION_11

0 commit comments

Comments
 (0)