From 3d5be8399f1df3e750a456d6af5e13c2fb8ad85c Mon Sep 17 00:00:00 2001 From: Renan <6718144+renancaraujo@users.noreply.github.com> Date: Tue, 10 Oct 2023 19:44:19 +0100 Subject: [PATCH] chore: update analysis (#40) * chore: update analysis * chore: update analysis --- analysis_options.yaml | 2 +- lib/game/game/asteroid.dart | 4 ---- lib/game/game/ship.dart | 4 ---- lib/game/game/shots.dart | 2 -- lib/game/game/watchsteroids_game.dart | 5 ----- lib/game/widgets/overlays.dart | 2 +- pubspec.lock | 4 ++-- pubspec.yaml | 2 +- 8 files changed, 5 insertions(+), 20 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 60e99d6..d6f1810 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:very_good_analysis/analysis_options.3.1.0.yaml +include: package:very_good_analysis/analysis_options.yaml linter: rules: public_member_api_docs: false diff --git a/lib/game/game/asteroid.dart b/lib/game/game/asteroid.dart index 1bb80fd..9219d64 100644 --- a/lib/game/game/asteroid.dart +++ b/lib/game/game/asteroid.dart @@ -164,11 +164,9 @@ class AsteroidSpawner extends Component case GameState.playing: timer = initialTimer; timer.start(); - break; case GameState.initial: case GameState.gameOver: timer.stop(); - break; } } } @@ -239,11 +237,9 @@ class Asteroid extends PositionComponent case GameState.initial: case GameState.playing: removeFromParent(); - break; case GameState.gameOver: rotateEffect?.pause(); moveAlongPathEffect?.pause(); - break; } } } diff --git a/lib/game/game/ship.dart b/lib/game/game/ship.dart index 9c3ec91..e31a6b3 100644 --- a/lib/game/game/ship.dart +++ b/lib/game/game/ship.dart @@ -228,17 +228,13 @@ class ShipGlow extends SpriteComponent case GameState.playing: position.y = (parent.y / 2) - 20; opacity = 1.0; - break; case GameState.initial: parent.parent.ship.angle = 0; parent.parent.shadow.angle = 0; parent.parent.shadow2.angle = 0; opacity = 0.0; - break; case GameState.gameOver: position.y = parent.y / 2; - - break; } } } diff --git a/lib/game/game/shots.dart b/lib/game/game/shots.dart index a6661fd..eaaa8db 100644 --- a/lib/game/game/shots.dart +++ b/lib/game/game/shots.dart @@ -55,11 +55,9 @@ class Cannon extends Component case GameState.playing: timer = initialTimer; timer.start(); - break; case GameState.initial: case GameState.gameOver: timer.stop(); - break; } } } diff --git a/lib/game/game/watchsteroids_game.dart b/lib/game/game/watchsteroids_game.dart index f33528c..e0dccab 100644 --- a/lib/game/game/watchsteroids_game.dart +++ b/lib/game/game/watchsteroids_game.dart @@ -158,14 +158,12 @@ class LogoInitial extends SpriteComponent add( opacityEffect = OpacityEffect.to(1, effectController), ); - break; case GameState.playing: case GameState.gameOver: effectController.setToStart(); add( opacityEffect = OpacityEffect.to(0, effectController), ); - break; } } } @@ -187,15 +185,12 @@ class GameStateSyncController extends Component calm: true, ); gameRef.rotationCubit.rotateTo(0); - break; case GameState.playing: gameRef.overlays.clear(); gameRef.overlays.add('score'); - break; case GameState.gameOver: gameRef.overlays.clear(); gameRef.overlays.add('gameOver'); - break; } } } diff --git a/lib/game/widgets/overlays.dart b/lib/game/widgets/overlays.dart index e2a08f8..370e184 100644 --- a/lib/game/widgets/overlays.dart +++ b/lib/game/widgets/overlays.dart @@ -89,7 +89,7 @@ class _InitialOverlayState extends State { } class CreditsOverlay extends StatelessWidget { - const CreditsOverlay({super.key, required this.progress}); + const CreditsOverlay({required this.progress, super.key}); final double progress; diff --git a/pubspec.lock b/pubspec.lock index e4afc6f..ab40874 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -689,10 +689,10 @@ packages: dependency: "direct dev" description: name: very_good_analysis - sha256: ebc48c51db35beeeec8c414e32f7bd78e612bd7f5992ccb0d46e19edaeb40b08 + sha256: "9ae7f3a3bd5764fb021b335ca28a34f040cd0ab6eec00a1b213b445dae58a4b8" url: "https://pub.dev" source: hosted - version: "4.0.0+1" + version: "5.1.0" vm_service: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 0b1a3b4..c3ce3d0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -29,7 +29,7 @@ dev_dependencies: flutter_test: sdk: flutter mocktail: ^1.0.0 - very_good_analysis: ^4.0.0+1 + very_good_analysis: ^5.1.0 flutter: uses-material-design: true