diff --git a/.gitignore b/.gitignore index bd315f72..eeb2b0f6 100644 --- a/.gitignore +++ b/.gitignore @@ -125,3 +125,5 @@ app.*.map.json !.idea/codeStyles/ !.idea/dictionaries/ !.idea/runConfigurations/ + +.firebase diff --git a/README.md b/README.md index b51926b5..b91a1c98 100644 --- a/README.md +++ b/README.md @@ -154,6 +154,33 @@ 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 +``` + [coverage_badge]: coverage_badge.svg [flutter_localizations_link]: https://api.flutter.dev/flutter/flutter_localizations/flutter_localizations-library.html [internationalization_link]: https://flutter.dev/docs/development/accessibility-and-localization/internationalization diff --git a/firebase.json b/firebase.json new file mode 100644 index 00000000..0d25a779 --- /dev/null +++ b/firebase.json @@ -0,0 +1,10 @@ +{ + "hosting": { + "public": "build/web", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ] + } +} diff --git a/lib/game/components/wall.dart b/lib/game/components/wall.dart index 7bf58273..b784b8cb 100644 --- a/lib/game/components/wall.dart +++ b/lib/game/components/wall.dart @@ -3,6 +3,9 @@ import 'package:flame_forge2d/flame_forge2d.dart'; import 'package:pinball/game/components/components.dart'; +/// {@template wall} +/// A continuos generic and [BodyType.static] barrier that divides a game area. +/// {@endtemplate} class Wall extends BodyComponent { Wall({ required this.start, @@ -29,6 +32,12 @@ class Wall extends BodyComponent { } } +/// {@template bottom_wall} +/// [Wall] located at the bottom of the board. +/// +/// Collisions with [BottomWall] are listened by +/// [BottomWallBallContactCallback]. +/// {@endtemplate} class BottomWall extends Wall { BottomWall(Forge2DGame game) : super( @@ -40,6 +49,9 @@ class BottomWall extends Wall { ); } +/// {@template bottom_wall_ball_contact_callback} +/// Listens when a [Ball] falls into a [BottomWall]. +/// {@endtemplate} class BottomWallBallContactCallback extends ContactCallback { @override void begin(Ball ball, BottomWall wall, Contact contact) {