diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml
index 82d8fae0..f260a028 100644
--- a/.github/workflows/deploy.yaml
+++ b/.github/workflows/deploy.yaml
@@ -21,7 +21,7 @@ jobs:
- name: Build Flutter App
run: |
flutter packages get
- flutter build web --target lib/main_development.dart --web-renderer canvaskit --release
+ flutter build web --target lib/main.dart --web-renderer canvaskit --release
- name: Deploy to Firebase
uses: FirebaseExtended/action-hosting-deploy@v0
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml
index 5bef442d..48ad112c 100644
--- a/.github/workflows/main.yaml
+++ b/.github/workflows/main.yaml
@@ -14,3 +14,4 @@ jobs:
flutter_version: 2.10.5
coverage_excludes: "lib/gen/*.dart"
test_optimization: false
+
diff --git a/.github/workflows/spell_check.yaml b/.github/workflows/spell_check.yaml
new file mode 100644
index 00000000..bfef58f8
--- /dev/null
+++ b/.github/workflows/spell_check.yaml
@@ -0,0 +1,21 @@
+name: spell_check
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+on: [pull_request]
+
+jobs:
+ build:
+ name: Spell Check
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Check spelling
+ uses: zwaldowski/cspell-action@v1
+ with:
+ paths: '**/*.{dart,arb,md}'
+ config: .vscode/cspell.json
\ No newline at end of file
diff --git a/.idea/runConfigurations/development.xml b/.idea/runConfigurations/development.xml
deleted file mode 100644
index 37d45fe3..00000000
--- a/.idea/runConfigurations/development.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/runConfigurations/main.xml b/.idea/runConfigurations/main.xml
new file mode 100644
index 00000000..b5c260ef
--- /dev/null
+++ b/.idea/runConfigurations/main.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/production.xml b/.idea/runConfigurations/production.xml
deleted file mode 100644
index e55961d8..00000000
--- a/.idea/runConfigurations/production.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/runConfigurations/staging.xml b/.idea/runConfigurations/staging.xml
deleted file mode 100644
index 3f7d6219..00000000
--- a/.idea/runConfigurations/staging.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.vscode/cspell.json b/.vscode/cspell.json
new file mode 100644
index 00000000..71c54903
--- /dev/null
+++ b/.vscode/cspell.json
@@ -0,0 +1,50 @@
+{
+ "version": "0.2",
+ "enabled": true,
+ "language": "en",
+ "words": [
+ "animatronic",
+ "argb",
+ "audioplayers",
+ "backbox",
+ "bezier",
+ "contador",
+ "cupertino",
+ "dashbook",
+ "deserialization",
+ "dpad",
+ "endtemplate",
+ "firestore",
+ "gapless",
+ "genhtml",
+ "goldens",
+ "lcov",
+ "leaderboard",
+ "loadables",
+ "localizable",
+ "mixins",
+ "mocktail",
+ "mostrado",
+ "multiball",
+ "multiballs",
+ "occluder",
+ "página",
+ "pixelated",
+ "pixeloid",
+ "rects",
+ "rrect",
+ "serializable",
+ "sparky's",
+ "tappable",
+ "tappables",
+ "texto",
+ "theming",
+ "unawaited",
+ "unfocus",
+ "unlayered",
+ "vsync"
+ ],
+ "ignorePaths": [
+ ".github/workflows/**"
+ ]
+}
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 1b855b10..e2ea6cee 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -5,30 +5,10 @@
"version": "0.2.0",
"configurations": [
{
- "name": "Launch development",
+ "name": "Launch pinball",
"request": "launch",
"type": "dart",
- "program": "lib/main_development.dart",
- "args": [
- "--flavor",
- "development",
- "--target",
- "lib/main_development.dart"
- ]
- },
- {
- "name": "Launch staging",
- "request": "launch",
- "type": "dart",
- "program": "lib/main_staging.dart",
- "args": ["--flavor", "staging", "--target", "lib/main_staging.dart"]
- },
- {
- "name": "Launch production",
- "request": "launch",
- "type": "dart",
- "program": "lib/main_production.dart",
- "args": ["--flavor", "production", "--target", "lib/main_production.dart"]
+ "program": "lib/main.dart"
},
{
"name": "Launch component sandbox",
diff --git a/README.md b/README.md
index b91a1c98..957cb05b 100644
--- a/README.md
+++ b/README.md
@@ -1,37 +1,31 @@
-# Pinball
+# I/O Pinball
+[![Pinball Header][logo]][pinball_link]
+
+[![io_pinball][build_status_badge]][workflow_link]
![coverage][coverage_badge]
[![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link]
[![License: MIT][license_badge]][license_link]
-Generated by the [Very Good CLI][very_good_cli_link] 🤖
+A Pinball game built with [Flutter][flutter_link] and [Firebase][firebase_link] for [Google I/O 2022][google_io_link].
-Google I/O 2022 Pinball game built with Flutter and Firebase
+[Try it now][pinball_link] and [learn about how it's made][blog_link].
----
+_Built by [Very Good Ventures][very_good_ventures_link] in partnership with Google_
-## Getting Started 🚀
+_Created using [Very Good CLI][very_good_cli_link] 🤖_
-This project contains 3 flavors:
+---
-- development
-- staging
-- production
+## Getting Started 🚀
-To run the desired flavor either use the launch configuration in VSCode/Android Studio or use the following commands:
+To run the desired project either use the launch configuration in VSCode/Android Studio or use the following commands:
```sh
-# Development
-$ flutter run --flavor development --target lib/main_development.dart
-
-# Staging
-$ flutter run --flavor staging --target lib/main_staging.dart
-
-# Production
-$ flutter run --flavor production --target lib/main_production.dart
+$ flutter run -d chrome
```
-_\*Pinball works on iOS, Android, Web, and Windows._
+_\*I/O Pinball works on Web for desktop and mobile._
---
@@ -48,7 +42,6 @@ To view the generated coverage report you can use [lcov](https://github.com/linu
```sh
# Generate Coverage Report
$ genhtml coverage/lcov.info -o coverage/
-
# Open Coverage Report
$ open coverage/index.html
```
@@ -101,22 +94,6 @@ Widget build(BuildContext context) {
}
```
-### Adding Supported Locales
-
-Update the `CFBundleLocalizations` array in the `Info.plist` at `ios/Runner/Info.plist` to include the new locale.
-
-```xml
- ...
-
- CFBundleLocalizations
-
- en
- es
-
-
- ...
-```
-
### Adding Translations
1. For each supported locale, add a new ARB file in `lib/l10n/arb`.
@@ -154,38 +131,20 @@ Update the `CFBundleLocalizations` array in the `Info.plist` at `ios/Runner/Info
}
```
-### Deploy application to Firebase hosting
-
-Follow the following steps to deploy the application.
-
-## Firebase CLI
-
-Install and authenticate with [Firebase CLI tools](https://firebase.google.com/docs/cli)
-
-## Build the project using the desired environment
-
-```bash
-# Development
-$ flutter build web --release --target lib/main_development.dart
-
-# Staging
-$ flutter build web --release --target lib/main_staging.dart
-
-# Production
-$ flutter build web --release --target lib/main_production.dart
-```
-
-## Deploy
-
-```bash
-$ firebase deploy
-```
-
+[build_status_badge]: https://github.com/flutter/pinball/actions/workflows/main.yaml/badge.svg
[coverage_badge]: coverage_badge.svg
+[firebase_link]: https://firebase.google.com/
+[flutter_link]: https://flutter.dev
[flutter_localizations_link]: https://api.flutter.dev/flutter/flutter_localizations/flutter_localizations-library.html
+[google_io_link]: https://events.google.com/io/
+[blog_link]: https://medium.com/flutter/i-o-pinball-powered-by-flutter-and-firebase-d22423f3f5d
[internationalization_link]: https://flutter.dev/docs/development/accessibility-and-localization/internationalization
[license_badge]: https://img.shields.io/badge/license-MIT-blue.svg
[license_link]: https://opensource.org/licenses/MIT
+[logo]: art/readme_header.png
+[pinball_link]: https://pinball.flutter.dev
[very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg
[very_good_analysis_link]: https://pub.dev/packages/very_good_analysis
[very_good_cli_link]: https://github.com/VeryGoodOpenSource/very_good_cli
+[very_good_ventures_link]: https://verygood.ventures/
+[workflow_link]: https://github.com/flutter/pinball/actions/workflows/main.yaml
diff --git a/art/readme_header.png b/art/readme_header.png
new file mode 100644
index 00000000..43e7fb53
Binary files /dev/null and b/art/readme_header.png differ
diff --git a/lib/game/behaviors/scoring_behavior.dart b/lib/game/behaviors/scoring_behavior.dart
index 8b403d1e..4d6d8b42 100644
--- a/lib/game/behaviors/scoring_behavior.dart
+++ b/lib/game/behaviors/scoring_behavior.dart
@@ -15,7 +15,7 @@ import 'package:pinball_flame/pinball_flame.dart';
/// {@endtemplate}
class ScoringBehavior extends Component
with HasGameRef, FlameBlocReader {
- /// {@macto scoring_behavior}
+ /// {@macro scoring_behavior}
ScoringBehavior({
required Points points,
required Vector2 position,
diff --git a/lib/game/bloc/game_bloc.dart b/lib/game/bloc/game_bloc.dart
index d00e5da1..795d04e2 100644
--- a/lib/game/bloc/game_bloc.dart
+++ b/lib/game/bloc/game_bloc.dart
@@ -12,7 +12,6 @@ class GameBloc extends Bloc {
on(_onScored);
on(_onIncreasedMultiplier);
on(_onBonusActivated);
- on(_onSparkyTurboChargeActivated);
on(_onGameOver);
on(_onGameStarted);
}
@@ -65,18 +64,4 @@ class GameBloc extends Bloc {
),
);
}
-
- Future _onSparkyTurboChargeActivated(
- SparkyTurboChargeActivated event,
- Emitter emit,
- ) async {
- emit(
- state.copyWith(
- bonusHistory: [
- ...state.bonusHistory,
- GameBonus.sparkyTurboCharge,
- ],
- ),
- );
- }
}
diff --git a/lib/game/bloc/game_event.dart b/lib/game/bloc/game_event.dart
index a8e8593b..126ba299 100644
--- a/lib/game/bloc/game_event.dart
+++ b/lib/game/bloc/game_event.dart
@@ -40,13 +40,6 @@ class BonusActivated extends GameEvent {
List