Skip to content

Commit

Permalink
feat: update dependencies and refactor the code (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
BBarisKilic authored Feb 12, 2023
2 parents ff38f2b + 73d554e commit 4d9b3ec
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 23 deletions.
2 changes: 1 addition & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 4 additions & 2 deletions lib/assets_manager/view/loading_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import 'package:one_dungeon/constants/constants.dart';
import 'package:one_dungeon/l10n/l10n.dart';

class LoadingPage extends StatelessWidget {
const LoadingPage({super.key, required double progress})
: _progress = progress;
const LoadingPage({
required double progress,
super.key,
}) : _progress = progress;

final double _progress;

Expand Down
4 changes: 2 additions & 2 deletions lib/entities/boy/boy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import 'package:one_dungeon/entities/entities.dart';

class Boy extends PositionedEntity {
Boy({
Vector2? center,
required LogicalKeyboardKey jumpKey,
required LogicalKeyboardKey leftKey,
required LogicalKeyboardKey rightKey,
Vector2? center,
}) : this._(
center: center ?? Vector2(30, 500),
behaviors: [
Expand All @@ -31,10 +31,10 @@ class Boy extends PositionedEntity {
);

Boy._({
Vector2? velocity,
required Vector2 center,
required Iterable<Behavior> behaviors,
required BoySprite boySprite,
Vector2? velocity,
}) : _boySprite = boySprite,
velocity = velocity ?? Vector2.zero(),
super(
Expand Down
2 changes: 1 addition & 1 deletion lib/entities/boy/boy_sprite.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import 'package:one_dungeon/game/game.dart';
class BoySprite extends SpriteAnimationGroupComponent<BoyState>
with HasGameRef<OneDungeonGame> {
BoySprite({
BoyState state = const BoyState.idle(),
required Vector2 textureSize,
BoyState state = const BoyState.idle(),
}) : _state = state,
_textureSize = textureSize,
super(size: textureSize / 2);
Expand Down
2 changes: 1 addition & 1 deletion lib/game/view/widgets/menu_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import 'package:one_dungeon/one_dungeon_audio/one_dungeon_audio.dart';

class MenuButton extends StatelessWidget {
const MenuButton({
super.key,
required this.onPressed,
required this.text,
super.key,
});

final void Function() onPressed;
Expand Down
5 changes: 4 additions & 1 deletion lib/start_game/widgets/start_game_listener.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import 'package:one_dungeon/sound/sound.dart';
import 'package:one_dungeon/start_game/start_game.dart';

class StartGameListener extends StatelessWidget {
const StartGameListener({super.key, required Widget child}) : _child = child;
const StartGameListener({
required Widget child,
super.key,
}) : _child = child;

final Widget _child;

Expand Down
18 changes: 9 additions & 9 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,18 @@ packages:
dependency: "direct main"
description:
name: bloc
sha256: bd4f8027bfa60d96c8046dec5ce74c463b2c918dce1b0d36593575995344534a
sha256: "658a5ae59edcf1e58aac98b000a71c762ad8f46f1394c34a52050cafb3e11a80"
url: "https://pub.dev"
source: hosted
version: "8.1.0"
version: "8.1.1"
bloc_test:
dependency: "direct dev"
description:
name: bloc_test
sha256: "622b97678bf8c06a94f4c26a89ee9ebf7319bf775383dee2233e86e1f94ee28d"
sha256: ffbb60c17ee3d8e3784cb78071088e353199057233665541e8ac6cd438dca8ad
url: "https://pub.dev"
source: hosted
version: "9.1.0"
version: "9.1.1"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -354,10 +354,10 @@ packages:
dependency: "direct main"
description:
name: flutter_bloc
sha256: "890c51c8007f0182360e523518a0c732efb89876cb4669307af7efada5b55557"
sha256: "434951eea948dbe87f737b674281465f610b8259c16c097b8163ce138749a775"
url: "https://pub.dev"
source: hosted
version: "8.1.1"
version: "8.1.2"
flutter_localizations:
dependency: "direct main"
description: flutter
Expand Down Expand Up @@ -877,10 +877,10 @@ packages:
dependency: "direct dev"
description:
name: very_good_analysis
sha256: "4815adc7ded57657038d2bb2a7f332c50e3c8152f7d3c6acf8f6b7c0cc81e5e2"
sha256: ebc48c51db35beeeec8c414e32f7bd78e612bd7f5992ccb0d46e19edaeb40b08
url: "https://pub.dev"
source: hosted
version: "3.1.0"
version: "4.0.0+1"
vm_service:
dependency: transitive
description:
Expand Down Expand Up @@ -946,5 +946,5 @@ packages:
source: hosted
version: "3.1.1"
sdks:
dart: ">=2.19.0 <4.0.0"
dart: ">=2.19.0 <3.0.0"
flutter: ">=3.7.0"
12 changes: 6 additions & 6 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ environment:
flutter: ">=3.7.0"

dependencies:
bloc: ^8.1.0
bloc: ^8.1.1
equatable: ^2.0.5
flame: ^1.6.0
flame_audio: ^1.3.5
flame_audio: ^1.4.0
flame_behaviors: ^0.2.0
flame_tiled: ^1.9.1
flutter:
sdk: flutter
flutter_bloc: ^8.1.1
flutter_bloc: ^8.1.2
flutter_localizations:
sdk: flutter
freezed_annotation: ^2.2.0
Expand All @@ -26,14 +26,14 @@ dependencies:
path: ./packages/sharp_toggle_switch

dev_dependencies:
bloc_test: ^9.1.0
bloc_test: ^9.1.1
build_runner: ^2.3.3
flame_test: ^1.9.2
flutter_test:
sdk: flutter
freezed: ^2.1.0+1
freezed: ^2.3.2
mocktail: ^0.3.0
very_good_analysis: ^3.1.0
very_good_analysis: ^4.0.0+1

flutter:
uses-material-design: true
Expand Down

0 comments on commit 4d9b3ec

Please sign in to comment.