Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 99 additions & 3 deletions brick_breaker/codelab_rebuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -411,6 +443,22 @@ steps:

@override
FutureOr<void> 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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -869,8 +949,8 @@ steps:

- debugMode = true;
+ @override
+ void onTap() {
+ super.onTap();
+ void onTapDown(TapDownEvent event) {
+ super.onTapDown(event);
+ startGame();
}

Expand Down Expand Up @@ -1039,6 +1119,22 @@ steps:
<application
android:label="brick_breaker"
android:name="${applicationName}"
- 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_09
copydir:
from: brick_breaker
Expand Down
6 changes: 3 additions & 3 deletions brick_breaker/step_03/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions brick_breaker/step_04/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions brick_breaker/step_05/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions brick_breaker/step_06/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions brick_breaker/step_07/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions brick_breaker/step_08/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions brick_breaker/step_09/lib/src/brick_breaker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import 'config.dart';
enum PlayState { welcome, playing, gameOver, won }

class BrickBreaker extends FlameGame
with HasCollisionDetection, KeyboardEvents, TapDetector {
with HasCollisionDetection, KeyboardEvents, TapCallbacks {
BrickBreaker()
: super(
camera: CameraComponent.withFixedResolution(
Expand Down Expand Up @@ -100,8 +100,8 @@ class BrickBreaker extends FlameGame
}

@override
void onTap() {
super.onTap();
void onTapDown(TapDownEvent event) {
super.onTapDown(event);
startGame();
}

Expand Down
6 changes: 3 additions & 3 deletions brick_breaker/step_09/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions brick_breaker/step_10/lib/src/brick_breaker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import 'config.dart';
enum PlayState { welcome, playing, gameOver, won }

class BrickBreaker extends FlameGame
with HasCollisionDetection, KeyboardEvents, TapDetector {
with HasCollisionDetection, KeyboardEvents, TapCallbacks {
BrickBreaker()
: super(
camera: CameraComponent.withFixedResolution(
Expand Down Expand Up @@ -102,8 +102,8 @@ class BrickBreaker extends FlameGame
}

@override
void onTap() {
super.onTap();
void onTapDown(TapDownEvent event) {
super.onTapDown(event);
startGame();
}

Expand Down
6 changes: 3 additions & 3 deletions brick_breaker/step_10/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down