From f4d672316edbd0fc42de659c62fe3b37a7e0126b Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Thu, 23 Oct 2025 12:21:55 +0900 Subject: [PATCH 1/2] Updating dependencies --- brick_breaker/step_03/pubspec.yaml | 6 +++--- brick_breaker/step_04/pubspec.yaml | 6 +++--- brick_breaker/step_05/pubspec.yaml | 6 +++--- brick_breaker/step_06/pubspec.yaml | 6 +++--- brick_breaker/step_07/pubspec.yaml | 6 +++--- brick_breaker/step_08/pubspec.yaml | 6 +++--- brick_breaker/step_09/pubspec.yaml | 6 +++--- brick_breaker/step_10/pubspec.yaml | 6 +++--- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/brick_breaker/step_03/pubspec.yaml b/brick_breaker/step_03/pubspec.yaml index 1f1f03468a..d024938bd6 100644 --- a/brick_breaker/step_03/pubspec.yaml +++ b/brick_breaker/step_03/pubspec.yaml @@ -4,14 +4,14 @@ publish_to: 'none' version: 0.1.0 environment: - sdk: ^3.9.0 + sdk: ^3.9.2 dependencies: flutter: sdk: flutter - flame: ^1.30.1 + flame: ^1.33.0 flutter_animate: ^4.5.2 - google_fonts: ^6.3.0 + google_fonts: ^6.3.2 dev_dependencies: flutter_test: diff --git a/brick_breaker/step_04/pubspec.yaml b/brick_breaker/step_04/pubspec.yaml index 1f1f03468a..d024938bd6 100644 --- a/brick_breaker/step_04/pubspec.yaml +++ b/brick_breaker/step_04/pubspec.yaml @@ -4,14 +4,14 @@ publish_to: 'none' version: 0.1.0 environment: - sdk: ^3.9.0 + sdk: ^3.9.2 dependencies: flutter: sdk: flutter - flame: ^1.30.1 + flame: ^1.33.0 flutter_animate: ^4.5.2 - google_fonts: ^6.3.0 + google_fonts: ^6.3.2 dev_dependencies: flutter_test: diff --git a/brick_breaker/step_05/pubspec.yaml b/brick_breaker/step_05/pubspec.yaml index 1f1f03468a..d024938bd6 100644 --- a/brick_breaker/step_05/pubspec.yaml +++ b/brick_breaker/step_05/pubspec.yaml @@ -4,14 +4,14 @@ publish_to: 'none' version: 0.1.0 environment: - sdk: ^3.9.0 + sdk: ^3.9.2 dependencies: flutter: sdk: flutter - flame: ^1.30.1 + flame: ^1.33.0 flutter_animate: ^4.5.2 - google_fonts: ^6.3.0 + google_fonts: ^6.3.2 dev_dependencies: flutter_test: diff --git a/brick_breaker/step_06/pubspec.yaml b/brick_breaker/step_06/pubspec.yaml index 1f1f03468a..d024938bd6 100644 --- a/brick_breaker/step_06/pubspec.yaml +++ b/brick_breaker/step_06/pubspec.yaml @@ -4,14 +4,14 @@ publish_to: 'none' version: 0.1.0 environment: - sdk: ^3.9.0 + sdk: ^3.9.2 dependencies: flutter: sdk: flutter - flame: ^1.30.1 + flame: ^1.33.0 flutter_animate: ^4.5.2 - google_fonts: ^6.3.0 + google_fonts: ^6.3.2 dev_dependencies: flutter_test: diff --git a/brick_breaker/step_07/pubspec.yaml b/brick_breaker/step_07/pubspec.yaml index 1f1f03468a..d024938bd6 100644 --- a/brick_breaker/step_07/pubspec.yaml +++ b/brick_breaker/step_07/pubspec.yaml @@ -4,14 +4,14 @@ publish_to: 'none' version: 0.1.0 environment: - sdk: ^3.9.0 + sdk: ^3.9.2 dependencies: flutter: sdk: flutter - flame: ^1.30.1 + flame: ^1.33.0 flutter_animate: ^4.5.2 - google_fonts: ^6.3.0 + google_fonts: ^6.3.2 dev_dependencies: flutter_test: diff --git a/brick_breaker/step_08/pubspec.yaml b/brick_breaker/step_08/pubspec.yaml index 1f1f03468a..d024938bd6 100644 --- a/brick_breaker/step_08/pubspec.yaml +++ b/brick_breaker/step_08/pubspec.yaml @@ -4,14 +4,14 @@ publish_to: 'none' version: 0.1.0 environment: - sdk: ^3.9.0 + sdk: ^3.9.2 dependencies: flutter: sdk: flutter - flame: ^1.30.1 + flame: ^1.33.0 flutter_animate: ^4.5.2 - google_fonts: ^6.3.0 + google_fonts: ^6.3.2 dev_dependencies: flutter_test: diff --git a/brick_breaker/step_09/pubspec.yaml b/brick_breaker/step_09/pubspec.yaml index 1f1f03468a..d024938bd6 100644 --- a/brick_breaker/step_09/pubspec.yaml +++ b/brick_breaker/step_09/pubspec.yaml @@ -4,14 +4,14 @@ publish_to: 'none' version: 0.1.0 environment: - sdk: ^3.9.0 + sdk: ^3.9.2 dependencies: flutter: sdk: flutter - flame: ^1.30.1 + flame: ^1.33.0 flutter_animate: ^4.5.2 - google_fonts: ^6.3.0 + google_fonts: ^6.3.2 dev_dependencies: flutter_test: diff --git a/brick_breaker/step_10/pubspec.yaml b/brick_breaker/step_10/pubspec.yaml index 1f1f03468a..d024938bd6 100644 --- a/brick_breaker/step_10/pubspec.yaml +++ b/brick_breaker/step_10/pubspec.yaml @@ -4,14 +4,14 @@ publish_to: 'none' version: 0.1.0 environment: - sdk: ^3.9.0 + sdk: ^3.9.2 dependencies: flutter: sdk: flutter - flame: ^1.30.1 + flame: ^1.33.0 flutter_animate: ^4.5.2 - google_fonts: ^6.3.0 + google_fonts: ^6.3.2 dev_dependencies: flutter_test: From fc21c0fc0d35258ddabac9cd322ba911d833cea0 Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Thu, 23 Oct 2025 14:35:56 +0900 Subject: [PATCH 2/2] Fixup Brick Breaker --- brick_breaker/codelab_rebuild.yaml | 102 +++++++++++++++++- .../step_09/lib/src/brick_breaker.dart | 6 +- .../step_10/lib/src/brick_breaker.dart | 6 +- 3 files changed, 105 insertions(+), 9 deletions(-) diff --git a/brick_breaker/codelab_rebuild.yaml b/brick_breaker/codelab_rebuild.yaml index 7367700fee..5d963a607b 100644 --- a/brick_breaker/codelab_rebuild.yaml +++ b/brick_breaker/codelab_rebuild.yaml @@ -202,6 +202,22 @@ steps: size = Vector2(game.width, game.height); } } + - name: Build iOS simulator bundle + platforms: [macos] + path: brick_breaker + flutter: build ios --simulator + - name: Build macOS app + platforms: [macos] + path: brick_breaker + flutter: build macos + - name: Build Linux app + platforms: [linux] + path: brick_breaker + flutter: build linux + - name: Build Windows app + platforms: [windows] + path: brick_breaker + flutter: build windows - name: Copy step_04 copydir: from: brick_breaker @@ -305,6 +321,22 @@ steps: position += velocity * dt; } } + - name: Build iOS simulator bundle + platforms: [macos] + path: brick_breaker + flutter: build ios --simulator + - name: Build macOS app + platforms: [macos] + path: brick_breaker + flutter: build macos + - name: Build Linux app + platforms: [linux] + path: brick_breaker + flutter: build linux + - name: Build Windows app + platforms: [windows] + path: brick_breaker + flutter: build windows - name: Copy step_05 copydir: from: brick_breaker @@ -411,6 +443,22 @@ steps: @override FutureOr onLoad() async { + - name: Build iOS simulator bundle + platforms: [macos] + path: brick_breaker + flutter: build ios --simulator + - name: Build macOS app + platforms: [macos] + path: brick_breaker + flutter: build macos + - name: Build Linux app + platforms: [linux] + path: brick_breaker + flutter: build linux + - name: Build Windows app + platforms: [windows] + path: brick_breaker + flutter: build windows - name: Copy step_06 copydir: from: brick_breaker @@ -583,6 +631,22 @@ steps: ); } } + - name: Build iOS simulator bundle + platforms: [macos] + path: brick_breaker + flutter: build ios --simulator + - name: Build macOS app + platforms: [macos] + path: brick_breaker + flutter: build macos + - name: Build Linux app + platforms: [linux] + path: brick_breaker + flutter: build linux + - name: Build Windows app + platforms: [windows] + path: brick_breaker + flutter: build windows - name: Copy step_07 copydir: from: brick_breaker @@ -762,6 +826,22 @@ steps: } } } + - name: Build iOS simulator bundle + platforms: [macos] + path: brick_breaker + flutter: build ios --simulator + - name: Build macOS app + platforms: [macos] + path: brick_breaker + flutter: build macos + - name: Build Linux app + platforms: [linux] + path: brick_breaker + flutter: build linux + - name: Build Windows app + platforms: [windows] + path: brick_breaker + flutter: build windows - name: Copy step_08 copydir: from: brick_breaker @@ -806,7 +886,7 @@ steps: + class BrickBreaker extends FlameGame - with HasCollisionDetection, KeyboardEvents { - + with HasCollisionDetection, KeyboardEvents, TapDetector { + + with HasCollisionDetection, KeyboardEvents, TapCallbacks { BrickBreaker() : super( camera: CameraComponent.withFixedResolution( @@ -869,8 +949,8 @@ steps: - debugMode = true; + @override - + void onTap() { - + super.onTap(); + + void onTapDown(TapDownEvent event) { + + super.onTapDown(event); + startGame(); } @@ -1039,6 +1119,22 @@ steps: