From a4dc4088c766ea386cd15c39644f9f18085837a4 Mon Sep 17 00:00:00 2001 From: Luan Nico Date: Tue, 16 Jul 2024 09:19:24 -0400 Subject: [PATCH] chore: Update version of lints to comply with new pub requirements --- .../stories/components/time_scale_example.dart | 7 +++++-- .../stories/system/step_engine_example.dart | 18 ++++++++++++------ .../components/input/joystick_component.dart | 8 ++++---- .../behavior_tree/pubspec.yaml | 1 - packages/flame_lint/pubspec.yaml | 2 +- 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/examples/lib/stories/components/time_scale_example.dart b/examples/lib/stories/components/time_scale_example.dart index dfe59eb1e2d..5c41b9fa07c 100644 --- a/examples/lib/stories/components/time_scale_example.dart +++ b/examples/lib/stories/components/time_scale_example.dart @@ -108,11 +108,14 @@ class _Chopper extends SpriteAnimationComponent } @override - void onCollisionStart(Set _, PositionComponent other) { + void onCollisionStart( + Set intersectionPoints, + PositionComponent other, + ) { if (other is _Chopper) { game.timeScale = 0.25; } - super.onCollisionStart(_, other); + super.onCollisionStart(intersectionPoints, other); } @override diff --git a/examples/lib/stories/system/step_engine_example.dart b/examples/lib/stories/system/step_engine_example.dart index da6ee9d6cba..a2d1bc7f433 100644 --- a/examples/lib/stories/system/step_engine_example.dart +++ b/examples/lib/stories/system/step_engine_example.dart @@ -59,7 +59,10 @@ class StepEngineExample extends FlameGame } @override - KeyEventResult onKeyEvent(_, Set keysPressed) { + KeyEventResult onKeyEvent( + KeyEvent event, + Set keysPressed, + ) { if (keysPressed.contains(LogicalKeyboardKey.keyP)) { paused = !paused; } else if (keysPressed.contains(LogicalKeyboardKey.keyS)) { @@ -71,7 +74,7 @@ class StepEngineExample extends FlameGame _stepTimeMultiplier -= 1; _controlsText.text = _text; } - return super.onKeyEvent(_, keysPressed); + return super.onKeyEvent(event, keysPressed); } // Creates the circle detectors. @@ -128,14 +131,17 @@ class _DetectorComponents extends CircleComponent with CollisionCallbacks { }); @override - void onCollisionStart(_, __) { + void onCollisionStart( + Set intersectionPoints, + PositionComponent other, + ) { paint.color = BasicPalette.black.color; - super.onCollisionStart(_, __); + super.onCollisionStart(intersectionPoints, other); } @override - void onCollisionEnd(__) { + void onCollisionEnd(PositionComponent other) { paint.color = BasicPalette.white.color; - super.onCollisionEnd(__); + super.onCollisionEnd(other); } } diff --git a/packages/flame/lib/src/components/input/joystick_component.dart b/packages/flame/lib/src/components/input/joystick_component.dart index 9106e31d2fa..d7c1acf3356 100644 --- a/packages/flame/lib/src/components/input/joystick_component.dart +++ b/packages/flame/lib/src/components/input/joystick_component.dart @@ -119,15 +119,15 @@ class JoystickComponent extends PositionComponent } @override - bool onDragEnd(_) { - super.onDragEnd(_); + bool onDragEnd(DragEndEvent event) { + super.onDragEnd(event); onDragStop(); return false; } @override - bool onDragCancel(_) { - super.onDragCancel(_); + bool onDragCancel(DragCancelEvent event) { + super.onDragCancel(event); onDragStop(); return false; } diff --git a/packages/flame_behavior_tree/behavior_tree/pubspec.yaml b/packages/flame_behavior_tree/behavior_tree/pubspec.yaml index a6e36f3b1a6..b952e2ec508 100644 --- a/packages/flame_behavior_tree/behavior_tree/pubspec.yaml +++ b/packages/flame_behavior_tree/behavior_tree/pubspec.yaml @@ -15,6 +15,5 @@ dependencies: dev_dependencies: flame_lint: ^1.2.0 - lints: ^3.0.0 mocktail: ^1.0.3 test: any diff --git a/packages/flame_lint/pubspec.yaml b/packages/flame_lint/pubspec.yaml index 24e896df1e7..ec0adf5d006 100644 --- a/packages/flame_lint/pubspec.yaml +++ b/packages/flame_lint/pubspec.yaml @@ -14,7 +14,7 @@ environment: sdk: ">=3.4.0 <4.0.0" dependencies: - lints: ^3.0.0 + lints: ^4.0.0 dev_dependencies: dartdoc: ^8.0.8