diff --git a/lib/game/behaviors/bonus_noise_behavior.dart b/lib/game/behaviors/bonus_noise_behavior.dart index 9d67e964..70c8ad3e 100644 --- a/lib/game/behaviors/bonus_noise_behavior.dart +++ b/lib/game/behaviors/bonus_noise_behavior.dart @@ -25,13 +25,10 @@ class BonusNoiseBehavior extends Component { audioPlayer.play(PinballAudio.sparky); break; case GameBonus.dinoChomp: - // TODO(erickzanardo): Add sound break; case GameBonus.androidSpaceship: - // TODO(erickzanardo): Add sound break; case GameBonus.dashNest: - // TODO(erickzanardo): Add sound break; } }, diff --git a/lib/game/components/android_acres/behaviors/android_spaceship_bonus_behavior.dart b/lib/game/components/android_acres/behaviors/android_spaceship_bonus_behavior.dart index da181f9e..cbb6e516 100644 --- a/lib/game/components/android_acres/behaviors/android_spaceship_bonus_behavior.dart +++ b/lib/game/components/android_acres/behaviors/android_spaceship_bonus_behavior.dart @@ -11,10 +11,6 @@ class AndroidSpaceshipBonusBehavior extends Component void onMount() { super.onMount(); final androidSpaceship = parent.firstChild()!; - - // TODO(alestiago): Refactor subscription management once the following is - // merged: - // https://github.com/flame-engine/flame/pull/1538 androidSpaceship.bloc.stream.listen((state) { final listenWhen = state == AndroidSpaceshipState.withBonus; if (!listenWhen) return; diff --git a/lib/game/components/backbox/displays/initials_input_display.dart b/lib/game/components/backbox/displays/initials_input_display.dart index 244a3e5b..68c58f43 100644 --- a/lib/game/components/backbox/displays/initials_input_display.dart +++ b/lib/game/components/backbox/displays/initials_input_display.dart @@ -32,7 +32,6 @@ final _subtitleTextPaint = TextPaint( /// {@template initials_input_display} /// Display that handles the user input on the game over view. /// {@endtemplate} -// TODO(allisonryan0002): add mobile input buttons. class InitialsInputDisplay extends Component with HasGameRef { /// {@macro initials_input_display} InitialsInputDisplay({ diff --git a/lib/game/components/bottom_group.dart b/lib/game/components/bottom_group.dart index 13bef589..4c6b2822 100644 --- a/lib/game/components/bottom_group.dart +++ b/lib/game/components/bottom_group.dart @@ -9,7 +9,6 @@ import 'package:pinball_flame/pinball_flame.dart'; /// /// The [BottomGroup] consists of [Flipper]s, [Baseboard]s and [Kicker]s. /// {@endtemplate} -// TODO(allisonryan0002): Consider renaming. class BottomGroup extends Component with ZIndex { /// {@macro bottom_group} BottomGroup() diff --git a/lib/game/components/dino_desert/behaviors/chrome_dino_bonus_behavior.dart b/lib/game/components/dino_desert/behaviors/chrome_dino_bonus_behavior.dart index f1e4f53d..60cd1857 100644 --- a/lib/game/components/dino_desert/behaviors/chrome_dino_bonus_behavior.dart +++ b/lib/game/components/dino_desert/behaviors/chrome_dino_bonus_behavior.dart @@ -11,10 +11,6 @@ class ChromeDinoBonusBehavior extends Component void onMount() { super.onMount(); final chromeDino = parent.firstChild()!; - - // TODO(alestiago): Refactor subscription management once the following is - // merged: - // https://github.com/flame-engine/flame/pull/1538 chromeDino.bloc.stream.listen((state) { final listenWhen = state.status == ChromeDinoStatus.chomping; if (!listenWhen) return; diff --git a/lib/game/components/flutter_forest/behaviors/flutter_forest_bonus_behavior.dart b/lib/game/components/flutter_forest/behaviors/flutter_forest_bonus_behavior.dart index c94cda60..f37299c7 100644 --- a/lib/game/components/flutter_forest/behaviors/flutter_forest_bonus_behavior.dart +++ b/lib/game/components/flutter_forest/behaviors/flutter_forest_bonus_behavior.dart @@ -25,9 +25,6 @@ class FlutterForestBonusBehavior extends Component final canvas = gameRef.descendants().whereType().single; for (final bumper in bumpers) { - // TODO(alestiago): Refactor subscription management once the following is - // merged: - // https://github.com/flame-engine/flame/pull/1538 bumper.bloc.stream.listen((state) { final activatedAllBumpers = bumpers.every( (bumper) => bumper.bloc.state == DashNestBumperState.active, diff --git a/lib/game/components/google_word/behaviors/google_word_bonus_behavior.dart b/lib/game/components/google_word/behaviors/google_word_bonus_behavior.dart index 586b8547..c1c14ed5 100644 --- a/lib/game/components/google_word/behaviors/google_word_bonus_behavior.dart +++ b/lib/game/components/google_word/behaviors/google_word_bonus_behavior.dart @@ -13,9 +13,6 @@ class GoogleWordBonusBehavior extends Component final googleLetters = parent.children.whereType(); for (final letter in googleLetters) { - // TODO(alestiago): Refactor subscription management once the following is - // merged: - // https://github.com/flame-engine/flame/pull/1538 letter.bloc.stream.listen((_) { final achievedBonus = googleLetters .every((letter) => letter.bloc.state == GoogleLetterState.lit); diff --git a/lib/game/components/sparky_scorch/behaviors/sparky_computer_bonus_behavior.dart b/lib/game/components/sparky_scorch/behaviors/sparky_computer_bonus_behavior.dart index 15deab29..d1b8898e 100644 --- a/lib/game/components/sparky_scorch/behaviors/sparky_computer_bonus_behavior.dart +++ b/lib/game/components/sparky_scorch/behaviors/sparky_computer_bonus_behavior.dart @@ -13,10 +13,6 @@ class SparkyComputerBonusBehavior extends Component super.onMount(); final sparkyComputer = parent.firstChild()!; final animatronic = parent.firstChild()!; - - // TODO(alestiago): Refactor subscription management once the following is - // merged: - // https://github.com/flame-engine/flame/pull/1538 sparkyComputer.bloc.stream.listen((state) async { final listenWhen = state == SparkyComputerState.withBall; if (!listenWhen) return; diff --git a/lib/game/pinball_game.dart b/lib/game/pinball_game.dart index 6f1aa630..063f959e 100644 --- a/lib/game/pinball_game.dart +++ b/lib/game/pinball_game.dart @@ -253,7 +253,6 @@ class PreviewLine extends PositionComponent with HasGameRef { } } -// TODO(wolfenrain): investigate this CI failure. class _DebugInformation extends Component with HasGameRef { @override PositionType get positionType => PositionType.widget; diff --git a/lib/select_character/cubit/character_theme_cubit.dart b/lib/select_character/cubit/character_theme_cubit.dart index 84792a71..362db11a 100644 --- a/lib/select_character/cubit/character_theme_cubit.dart +++ b/lib/select_character/cubit/character_theme_cubit.dart @@ -1,5 +1,4 @@ // ignore_for_file: public_member_api_docs -// TODO(allisonryan0002): Document this section when the API is stable. import 'package:bloc/bloc.dart'; import 'package:equatable/equatable.dart'; diff --git a/lib/select_character/cubit/character_theme_state.dart b/lib/select_character/cubit/character_theme_state.dart index a1669f69..2f0f22ea 100644 --- a/lib/select_character/cubit/character_theme_state.dart +++ b/lib/select_character/cubit/character_theme_state.dart @@ -1,5 +1,4 @@ // ignore_for_file: public_member_api_docs -// TODO(allisonryan0002): Document this section when the API is stable. part of 'character_theme_cubit.dart'; diff --git a/packages/pinball_components/lib/src/components/android_bumper/android_bumper.dart b/packages/pinball_components/lib/src/components/android_bumper/android_bumper.dart index edce2a78..7024f65c 100644 --- a/packages/pinball_components/lib/src/components/android_bumper/android_bumper.dart +++ b/packages/pinball_components/lib/src/components/android_bumper/android_bumper.dart @@ -93,8 +93,6 @@ class AndroidBumper extends BodyComponent with InitialPosition, ZIndex { /// Creates an [AndroidBumper] without any children. /// /// This can be used for testing [AndroidBumper]'s behaviors in isolation. - // TODO(alestiago): Refactor injecting bloc once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 @visibleForTesting AndroidBumper.test({ required this.bloc, @@ -105,8 +103,6 @@ class AndroidBumper extends BodyComponent with InitialPosition, ZIndex { final double _minorRadius; - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs final AndroidBumperCubit bloc; diff --git a/packages/pinball_components/lib/src/components/android_spaceship/android_spaceship.dart b/packages/pinball_components/lib/src/components/android_spaceship/android_spaceship.dart index d15a5516..c4cacc00 100644 --- a/packages/pinball_components/lib/src/components/android_spaceship/android_spaceship.dart +++ b/packages/pinball_components/lib/src/components/android_spaceship/android_spaceship.dart @@ -38,16 +38,12 @@ class AndroidSpaceship extends Component { /// Creates an [AndroidSpaceship] without any children. /// /// This can be used for testing [AndroidSpaceship]'s behaviors in isolation. - // TODO(alestiago): Refactor injecting bloc once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 @visibleForTesting AndroidSpaceship.test({ required this.bloc, Iterable? children, }) : super(children: children); - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 final AndroidSpaceshipCubit bloc; @override @@ -129,7 +125,6 @@ class _SpaceshipSaucerSpriteAnimationComponent extends SpriteAnimationComponent } } -// TODO(allisonryan0002): add pulsing behavior. class _LightBeamSpriteComponent extends SpriteComponent with HasGameRef, ZIndex { _LightBeamSpriteComponent() diff --git a/packages/pinball_components/lib/src/components/ball/ball.dart b/packages/pinball_components/lib/src/components/ball/ball.dart index 49e4f0e0..af7a0361 100644 --- a/packages/pinball_components/lib/src/components/ball/ball.dart +++ b/packages/pinball_components/lib/src/components/ball/ball.dart @@ -72,7 +72,6 @@ class Ball extends BodyComponent with Layered, InitialPosition, ZIndex { /// /// The [Ball] will no longer be affected by any forces, including it's /// weight and those emitted from collisions. - // TODO(allisonryan0002): prevent motion from contact with other balls. void stop() { body ..gravityScale = Vector2.zero() diff --git a/packages/pinball_components/lib/src/components/board_dimensions.dart b/packages/pinball_components/lib/src/components/board_dimensions.dart index 3d547996..4f994f73 100644 --- a/packages/pinball_components/lib/src/components/board_dimensions.dart +++ b/packages/pinball_components/lib/src/components/board_dimensions.dart @@ -5,7 +5,6 @@ import 'package:flame/extensions.dart'; /// {@template board_dimensions} /// Contains various board properties and dimensions for global use. /// {@endtemplate} -// TODO(allisonryan0002): consider alternatives for global dimensions. class BoardDimensions { /// Width and height of the board. static final size = Vector2(101.6, 143.8); diff --git a/packages/pinball_components/lib/src/components/chrome_dino/chrome_dino.dart b/packages/pinball_components/lib/src/components/chrome_dino/chrome_dino.dart index 61052b60..b7358767 100644 --- a/packages/pinball_components/lib/src/components/chrome_dino/chrome_dino.dart +++ b/packages/pinball_components/lib/src/components/chrome_dino/chrome_dino.dart @@ -38,15 +38,11 @@ class ChromeDino extends BodyComponent /// Creates a [ChromeDino] without any children. /// /// This can be used for testing [ChromeDino]'s behaviors in isolation. - // TODO(alestiago): Refactor injecting bloc once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 @visibleForTesting ChromeDino.test({ required this.bloc, }); - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs final ChromeDinoCubit bloc; diff --git a/packages/pinball_components/lib/src/components/dash_nest_bumper/dash_nest_bumper.dart b/packages/pinball_components/lib/src/components/dash_nest_bumper/dash_nest_bumper.dart index 4495053d..b203d1f3 100644 --- a/packages/pinball_components/lib/src/components/dash_nest_bumper/dash_nest_bumper.dart +++ b/packages/pinball_components/lib/src/components/dash_nest_bumper/dash_nest_bumper.dart @@ -90,8 +90,6 @@ class DashNestBumper extends BodyComponent with InitialPosition { /// Creates an [DashNestBumper] without any children. /// /// This can be used for testing [DashNestBumper]'s behaviors in isolation. - // TODO(alestiago): Refactor injecting bloc once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 @visibleForTesting DashNestBumper.test({required this.bloc}) : _majorRadius = 3, @@ -100,8 +98,6 @@ class DashNestBumper extends BodyComponent with InitialPosition { final double _majorRadius; final double _minorRadius; - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs final DashNestBumperCubit bloc; diff --git a/packages/pinball_components/lib/src/components/fire_effect.dart b/packages/pinball_components/lib/src/components/fire_effect.dart index e793b3e6..77f3dd02 100644 --- a/packages/pinball_components/lib/src/components/fire_effect.dart +++ b/packages/pinball_components/lib/src/components/fire_effect.dart @@ -8,14 +8,6 @@ import 'package:flutter/material.dart'; const _particleRadius = 0.25; -// TODO(erickzanardo): This component could just be a ParticleComponet, -/// unfortunately there is a Particle Component is not a PositionComponent, -/// which makes it hard to be used since we have camera transformations and on -// top of that, PositionComponent has a bug inside forge 2d games -/// -/// https://github.com/flame-engine/flame/issues/1484 -/// https://github.com/flame-engine/flame/issues/1484 - /// {@template fire_effect} /// A [BodyComponent] which creates a fire trail effect using the given /// parameters diff --git a/packages/pinball_components/lib/src/components/flipper.dart b/packages/pinball_components/lib/src/components/flipper.dart index b62d2390..ca033440 100644 --- a/packages/pinball_components/lib/src/components/flipper.dart +++ b/packages/pinball_components/lib/src/components/flipper.dart @@ -100,8 +100,8 @@ class Flipper extends BodyComponent with KeyboardHandler, InitialPosition { final trapezium = PolygonShape()..set(trapeziumVertices); final trapeziumFixtureDef = FixtureDef( trapezium, - density: 50, // TODO(alestiago): Use a proper density. - friction: .1, // TODO(alestiago): Use a proper friction. + density: 50, + friction: .1, ); return [ diff --git a/packages/pinball_components/lib/src/components/google_letter/google_letter.dart b/packages/pinball_components/lib/src/components/google_letter/google_letter.dart index 16218fa3..f447f6af 100644 --- a/packages/pinball_components/lib/src/components/google_letter/google_letter.dart +++ b/packages/pinball_components/lib/src/components/google_letter/google_letter.dart @@ -68,15 +68,11 @@ class GoogleLetter extends BodyComponent with InitialPosition { /// Creates a [GoogleLetter] without any children. /// /// This can be used for testing [GoogleLetter]'s behaviors in isolation. - // TODO(alestiago): Refactor injecting bloc once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 @visibleForTesting GoogleLetter.test({ required this.bloc, }); - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs final GoogleLetterCubit bloc; diff --git a/packages/pinball_components/lib/src/components/initial_position.dart b/packages/pinball_components/lib/src/components/initial_position.dart index 4265a3a7..1e9b6046 100644 --- a/packages/pinball_components/lib/src/components/initial_position.dart +++ b/packages/pinball_components/lib/src/components/initial_position.dart @@ -24,8 +24,6 @@ mixin InitialPosition on BodyComponent { @override Future onLoad() async { await super.onLoad(); - // TODO(alestiago): Investiagate why body.position.setFrom(initialPosition) - // works for some components and not others. assert( body.position == initialPosition, 'Body position does not match initialPosition.', diff --git a/packages/pinball_components/lib/src/components/kicker/kicker.dart b/packages/pinball_components/lib/src/components/kicker/kicker.dart index 1a45ad60..7bddd9eb 100644 --- a/packages/pinball_components/lib/src/components/kicker/kicker.dart +++ b/packages/pinball_components/lib/src/components/kicker/kicker.dart @@ -51,16 +51,12 @@ class Kicker extends BodyComponent with InitialPosition { /// Creates a [Kicker] without any children. /// /// This can be used for testing [Kicker]'s behaviors in isolation. - // TODO(alestiago): Refactor injecting bloc once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 @visibleForTesting Kicker.test({ required this.bloc, required BoardSide side, }) : _side = side; - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs final KickerCubit bloc; @@ -129,7 +125,6 @@ class Kicker extends BodyComponent with InitialPosition { FixtureDef(bouncyEdge, userData: 'bouncy_edge'), ]; - // TODO(alestiago): Evaluate if there is value on centering the fixtures. final centroid = geometry.centroid( [ upperCircle.position + Vector2(0, -upperCircle.radius), @@ -177,8 +172,6 @@ class _KickerSpriteGroupComponent extends SpriteGroupComponent @override Future onLoad() async { await super.onLoad(); - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs parent.bloc.stream.listen((state) => current = state); @@ -203,8 +196,6 @@ class _KickerSpriteGroupComponent extends SpriteGroupComponent } } -// TODO(alestiago): Evaluate if there's value on generalising this to -// all shapes. extension on Shape { void moveBy(Vector2 offset) { if (this is CircleShape) { diff --git a/packages/pinball_components/lib/src/components/launch_ramp.dart b/packages/pinball_components/lib/src/components/launch_ramp.dart index e8290cff..815c5d4c 100644 --- a/packages/pinball_components/lib/src/components/launch_ramp.dart +++ b/packages/pinball_components/lib/src/components/launch_ramp.dart @@ -32,9 +32,6 @@ class _LaunchRampBase extends BodyComponent with Layered, ZIndex { layer = Layer.launcher; } - // TODO(ruimiguel): final asset differs slightly from the current shape. We - // need to fix shape with correct vertices, but right now merge them to have - // final assets at game and not be blocked. List _createFixtureDefs() { final fixturesDef = []; diff --git a/packages/pinball_components/lib/src/components/layer.dart b/packages/pinball_components/lib/src/components/layer.dart index 8418fac1..8b93a4b2 100644 --- a/packages/pinball_components/lib/src/components/layer.dart +++ b/packages/pinball_components/lib/src/components/layer.dart @@ -74,7 +74,6 @@ extension LayerMaskBits on Layer { /// {@macro layer_mask_bits} @visibleForTesting int get maskBits { - // TODO(ruialonso): test bit groups once final design is implemented. switch (this) { case Layer.all: return 0xFFFF; diff --git a/packages/pinball_components/lib/src/components/layer_sensor/layer_sensor.dart b/packages/pinball_components/lib/src/components/layer_sensor/layer_sensor.dart index 4b1d6ae3..68e0f076 100644 --- a/packages/pinball_components/lib/src/components/layer_sensor/layer_sensor.dart +++ b/packages/pinball_components/lib/src/components/layer_sensor/layer_sensor.dart @@ -50,8 +50,6 @@ abstract class LayerSensor extends BodyComponent with InitialPosition, Layered { Shape get shape; /// {@macro layer_entrance_orientation} - // TODO(ruimiguel): Try to remove the need of [LayerEntranceOrientation] for - // collision calculations. final LayerEntranceOrientation orientation; @override diff --git a/packages/pinball_components/lib/src/components/multiball/multiball.dart b/packages/pinball_components/lib/src/components/multiball/multiball.dart index 663490ca..8f75a901 100644 --- a/packages/pinball_components/lib/src/components/multiball/multiball.dart +++ b/packages/pinball_components/lib/src/components/multiball/multiball.dart @@ -75,15 +75,11 @@ class Multiball extends Component { /// Creates an [Multiball] without any children. /// /// This can be used for testing [Multiball]'s behaviors in isolation. - // TODO(alestiago): Refactor injecting bloc once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 @visibleForTesting Multiball.test({ required this.bloc, }); - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs final MultiballCubit bloc; diff --git a/packages/pinball_components/lib/src/components/multiplier/multiplier.dart b/packages/pinball_components/lib/src/components/multiplier/multiplier.dart index 54d02857..f749f912 100644 --- a/packages/pinball_components/lib/src/components/multiplier/multiplier.dart +++ b/packages/pinball_components/lib/src/components/multiplier/multiplier.dart @@ -81,8 +81,6 @@ class Multiplier extends Component { /// Creates a [Multiplier] without any children. /// /// This can be used for testing [Multiplier]'s behaviors in isolation. - // TODO(alestiago): Refactor injecting bloc once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 @visibleForTesting Multiplier.test({ required MultiplierValue value, @@ -91,8 +89,6 @@ class Multiplier extends Component { _position = Vector2.zero(), _angle = 0; -// TODO(ruimiguel): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 final MultiplierCubit bloc; final MultiplierValue _value; diff --git a/packages/pinball_components/lib/src/components/plunger.dart b/packages/pinball_components/lib/src/components/plunger.dart index 5b9b77b2..44a91b0b 100644 --- a/packages/pinball_components/lib/src/components/plunger.dart +++ b/packages/pinball_components/lib/src/components/plunger.dart @@ -178,26 +178,16 @@ class _PlungerSpriteAnimationGroupComponent @override Future onLoad() async { await super.onLoad(); - - // TODO(alestiago): Used cached images. final spriteSheet = await gameRef.images.load( Assets.images.plunger.plunger.keyName, ); - const amountPerRow = 20; const amountPerColumn = 1; - final textureSize = Vector2( spriteSheet.width / amountPerRow, spriteSheet.height / amountPerColumn, ); size = textureSize / 10; - - // TODO(ruimiguel): we only need plunger pull animation, and release is just - // to reverse it, so we need to divide by 2 while we don't have only half of - // the animation (but amountPerRow and amountPerColumn needs to be correct - // in order of calculate textureSize correctly). - final pullAnimation = SpriteAnimation.fromFrameData( spriteSheet, SpriteAnimationData.sequenced( @@ -209,7 +199,6 @@ class _PlungerSpriteAnimationGroupComponent loop: false, ), ); - animations = { _PlungerAnimationState.release: pullAnimation.reversed(), _PlungerAnimationState.pull: pullAnimation, diff --git a/packages/pinball_components/lib/src/components/shapes/arc_shape.dart b/packages/pinball_components/lib/src/components/shapes/arc_shape.dart index 8b31e223..59519f0d 100644 --- a/packages/pinball_components/lib/src/components/shapes/arc_shape.dart +++ b/packages/pinball_components/lib/src/components/shapes/arc_shape.dart @@ -28,7 +28,6 @@ class ArcShape extends ChainShape { final Vector2 center; /// The radius of the arc. - // TODO(alestiago): Check if modifying the parent radius makes sense. final double arcRadius; /// Specifies the size of the arc, in radians. diff --git a/packages/pinball_components/lib/src/components/shapes/ellipse_shape.dart b/packages/pinball_components/lib/src/components/shapes/ellipse_shape.dart index bfa7d435..92898cad 100644 --- a/packages/pinball_components/lib/src/components/shapes/ellipse_shape.dart +++ b/packages/pinball_components/lib/src/components/shapes/ellipse_shape.dart @@ -26,7 +26,6 @@ class EllipseShape extends ChainShape { /// The top left corner of the ellipse. /// /// Where the initial painting begins. - // TODO(ruialonso): Change to use appropiate center. final Vector2 center; /// Major radius is specified by [majorRadius]. diff --git a/packages/pinball_components/lib/src/components/signpost/signpost.dart b/packages/pinball_components/lib/src/components/signpost/signpost.dart index d22f46f3..a8fffe79 100644 --- a/packages/pinball_components/lib/src/components/signpost/signpost.dart +++ b/packages/pinball_components/lib/src/components/signpost/signpost.dart @@ -36,15 +36,11 @@ class Signpost extends BodyComponent with InitialPosition { /// Creates a [Signpost] without any children. /// /// This can be used for testing [Signpost]'s behaviors in isolation. - // TODO(alestiago): Refactor injecting bloc once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 @visibleForTesting Signpost.test({ required this.bloc, }); - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs final SignpostCubit bloc; diff --git a/packages/pinball_components/lib/src/components/skill_shot/skill_shot.dart b/packages/pinball_components/lib/src/components/skill_shot/skill_shot.dart index 3bf10a7e..3daed592 100644 --- a/packages/pinball_components/lib/src/components/skill_shot/skill_shot.dart +++ b/packages/pinball_components/lib/src/components/skill_shot/skill_shot.dart @@ -38,15 +38,11 @@ class SkillShot extends BodyComponent with ZIndex { /// Creates a [SkillShot] without any children. /// /// This can be used for testing [SkillShot]'s behaviors in isolation. - // TODO(alestiago): Refactor injecting bloc once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 @visibleForTesting SkillShot.test({ required this.bloc, }); - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs final SkillShotCubit bloc; diff --git a/packages/pinball_components/lib/src/components/spaceship_ramp/spaceship_ramp.dart b/packages/pinball_components/lib/src/components/spaceship_ramp/spaceship_ramp.dart index 0b407517..8fb5200e 100644 --- a/packages/pinball_components/lib/src/components/spaceship_ramp/spaceship_ramp.dart +++ b/packages/pinball_components/lib/src/components/spaceship_ramp/spaceship_ramp.dart @@ -27,8 +27,6 @@ class SpaceshipRamp extends Component { required this.bloc, }) : super( children: [ - // TODO(ruimiguel): refactor RampScoringSensor and - // _SpaceshipRampOpening to be in only one sensor if possible. RampScoringSensor( children: [ RampBallAscendingContactBehavior(), @@ -68,8 +66,6 @@ class SpaceshipRamp extends Component { required this.bloc, }) : super(); - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs final SpaceshipRampCubit bloc; diff --git a/packages/pinball_components/lib/src/components/sparky_bumper/sparky_bumper.dart b/packages/pinball_components/lib/src/components/sparky_bumper/sparky_bumper.dart index b909f0ba..c4cb672a 100644 --- a/packages/pinball_components/lib/src/components/sparky_bumper/sparky_bumper.dart +++ b/packages/pinball_components/lib/src/components/sparky_bumper/sparky_bumper.dart @@ -93,8 +93,6 @@ class SparkyBumper extends BodyComponent with InitialPosition, ZIndex { /// Creates an [SparkyBumper] without any children. /// /// This can be used for testing [SparkyBumper]'s behaviors in isolation. - // TODO(alestiago): Refactor injecting bloc once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 @visibleForTesting SparkyBumper.test({ required this.bloc, @@ -104,8 +102,6 @@ class SparkyBumper extends BodyComponent with InitialPosition, ZIndex { final double _majorRadius; final double _minorRadius; - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs final SparkyBumperCubit bloc; @@ -152,8 +148,6 @@ class _SparkyBumperSpriteGroupComponent @override Future onLoad() async { await super.onLoad(); - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs parent.bloc.stream.listen((state) => current = state); diff --git a/packages/pinball_components/lib/src/components/sparky_computer/sparky_computer.dart b/packages/pinball_components/lib/src/components/sparky_computer/sparky_computer.dart index 9025d69d..c96e3f45 100644 --- a/packages/pinball_components/lib/src/components/sparky_computer/sparky_computer.dart +++ b/packages/pinball_components/lib/src/components/sparky_computer/sparky_computer.dart @@ -31,16 +31,12 @@ class SparkyComputer extends BodyComponent { /// Creates a [SparkyComputer] without any children. /// /// This can be used for testing [SparkyComputer]'s behaviors in isolation. - // TODO(alestiago): Refactor injecting bloc once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 @visibleForTesting SparkyComputer.test({ required this.bloc, Iterable? children, }) : super(children: children); - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs final SparkyComputerCubit bloc; diff --git a/packages/pinball_components/lib/src/components/z_indexes.dart b/packages/pinball_components/lib/src/components/z_indexes.dart index 88447312..e9fb68c9 100644 --- a/packages/pinball_components/lib/src/components/z_indexes.dart +++ b/packages/pinball_components/lib/src/components/z_indexes.dart @@ -1,7 +1,6 @@ // ignore_for_file: public_member_api_docs /// Z-Indexes for the component rendering order in the pinball game. -// TODO(allisonryan0002): find alternative to section comments. abstract class ZIndexes { static const _base = 0; static const _above = 1; @@ -21,8 +20,6 @@ abstract class ZIndexes { // Background - // TODO(allisonryan0002): fix this magic zindex. Could bump all priorities so - // there are no negatives. static const boardBackground = 5 * _below + _base; static const decal = _above + boardBackground; diff --git a/packages/pinball_components/test/src/components/android_bumper/android_bumper_test.dart b/packages/pinball_components/test/src/components/android_bumper/android_bumper_test.dart index aaca08fc..b6b99f32 100644 --- a/packages/pinball_components/test/src/components/android_bumper/android_bumper_test.dart +++ b/packages/pinball_components/test/src/components/android_bumper/android_bumper_test.dart @@ -44,8 +44,6 @@ void main() { expect(game.contains(androidBumper), isTrue); }); - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs flameTester.test('closes bloc when removed', (game) async { final bloc = _MockAndroidBumperCubit(); diff --git a/packages/pinball_components/test/src/components/android_spaceship/android_spaceship_test.dart b/packages/pinball_components/test/src/components/android_spaceship/android_spaceship_test.dart index 1b672be4..7e456a47 100644 --- a/packages/pinball_components/test/src/components/android_spaceship/android_spaceship_test.dart +++ b/packages/pinball_components/test/src/components/android_spaceship/android_spaceship_test.dart @@ -70,8 +70,6 @@ void main() { }, ); - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs flameTester.test('closes bloc when removed', (game) async { final bloc = _MockAndroidSpaceshipCubit(); diff --git a/packages/pinball_components/test/src/components/chrome_dino/chrome_dino_test.dart b/packages/pinball_components/test/src/components/chrome_dino/chrome_dino_test.dart index d6366092..603f6ca0 100644 --- a/packages/pinball_components/test/src/components/chrome_dino/chrome_dino_test.dart +++ b/packages/pinball_components/test/src/components/chrome_dino/chrome_dino_test.dart @@ -71,8 +71,6 @@ void main() { }, ); - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs flameTester.test('closes bloc when removed', (game) async { final bloc = _MockChromeDinoCubit(); diff --git a/packages/pinball_components/test/src/components/dash_nest_bumper/dash_nest_bumper_test.dart b/packages/pinball_components/test/src/components/dash_nest_bumper/dash_nest_bumper_test.dart index 195231bf..0ee1d6b9 100644 --- a/packages/pinball_components/test/src/components/dash_nest_bumper/dash_nest_bumper_test.dart +++ b/packages/pinball_components/test/src/components/dash_nest_bumper/dash_nest_bumper_test.dart @@ -46,8 +46,6 @@ void main() { expect(game.contains(bumper), isTrue); }); - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs flameTester.test('closes bloc when removed', (game) async { final bloc = _MockDashNestBumperCubit(); diff --git a/packages/pinball_components/test/src/components/flipper_test.dart b/packages/pinball_components/test/src/components/flipper_test.dart index 314b1f77..53b0e108 100644 --- a/packages/pinball_components/test/src/components/flipper_test.dart +++ b/packages/pinball_components/test/src/components/flipper_test.dart @@ -18,8 +18,6 @@ void main() { final flameTester = FlameTester(() => TestGame(assets)); group('Flipper', () { - // TODO(alestiago): Consider testing always both left and right Flipper. - flameTester.testGameWidget( 'renders correctly', setUp: (game, tester) async { diff --git a/packages/pinball_components/test/src/components/google_letter/google_letter_test.dart b/packages/pinball_components/test/src/components/google_letter/google_letter_test.dart index afd4c130..3a459ddb 100644 --- a/packages/pinball_components/test/src/components/google_letter/google_letter_test.dart +++ b/packages/pinball_components/test/src/components/google_letter/google_letter_test.dart @@ -102,8 +102,6 @@ void main() { expect(() => GoogleLetter(6), throwsA(isA())); }); - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs flameTester.test('closes bloc when removed', (game) async { final bloc = _MockGoogleLetterCubit(); diff --git a/packages/pinball_components/test/src/components/kicker_test.dart b/packages/pinball_components/test/src/components/kicker_test.dart index 4d3fc14d..c91046ba 100644 --- a/packages/pinball_components/test/src/components/kicker_test.dart +++ b/packages/pinball_components/test/src/components/kicker_test.dart @@ -61,8 +61,6 @@ void main() { }, ); - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs flameTester.test('closes bloc when removed', (game) async { final bloc = _MockKickerCubit(); diff --git a/packages/pinball_components/test/src/components/skill_shot/skill_shot_test.dart b/packages/pinball_components/test/src/components/skill_shot/skill_shot_test.dart index dabacc69..4ec42a4b 100644 --- a/packages/pinball_components/test/src/components/skill_shot/skill_shot_test.dart +++ b/packages/pinball_components/test/src/components/skill_shot/skill_shot_test.dart @@ -29,8 +29,6 @@ void main() { expect(game.contains(skillShot), isTrue); }); - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs flameTester.test('closes bloc when removed', (game) async { final bloc = _MockSkillShotCubit(); diff --git a/packages/pinball_components/test/src/components/sparky_bumper/sparky_bumper_test.dart b/packages/pinball_components/test/src/components/sparky_bumper/sparky_bumper_test.dart index 7544fdd2..65f0c647 100644 --- a/packages/pinball_components/test/src/components/sparky_bumper/sparky_bumper_test.dart +++ b/packages/pinball_components/test/src/components/sparky_bumper/sparky_bumper_test.dart @@ -44,8 +44,6 @@ void main() { expect(game.contains(sparkyBumper), isTrue); }); - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs flameTester.test('closes bloc when removed', (game) async { final bloc = _MockSparkyBumperCubit(); diff --git a/packages/pinball_components/test/src/components/sparky_computer/sparky_computer_test.dart b/packages/pinball_components/test/src/components/sparky_computer/sparky_computer_test.dart index ffb14fd8..dcbccd3e 100644 --- a/packages/pinball_components/test/src/components/sparky_computer/sparky_computer_test.dart +++ b/packages/pinball_components/test/src/components/sparky_computer/sparky_computer_test.dart @@ -47,8 +47,6 @@ void main() { }, ); - // TODO(alestiago): Consider refactoring once the following is merged: - // https://github.com/flame-engine/flame/pull/1538 // ignore: public_member_api_docs flameTester.test('closes bloc when removed', (game) async { final bloc = _MockSparkyComputerCubit(); diff --git a/packages/pinball_flame/lib/src/contact_behavior.dart b/packages/pinball_flame/lib/src/contact_behavior.dart index 92f108d8..855bb620 100644 --- a/packages/pinball_flame/lib/src/contact_behavior.dart +++ b/packages/pinball_flame/lib/src/contact_behavior.dart @@ -10,8 +10,6 @@ import 'package:pinball_flame/pinball_flame.dart'; /// /// It does so by grouping the userData in a [_UserData], and resetting the /// parent's userData accordingly. -// TODO(alestiago): Make use of generics to infer the type of the contact. -// https://github.com/VGVentures/pinball/pull/234#discussion_r859182267 class ContactBehavior extends Component with ContactCallbacks, ParentIsA { final _fixturesUserData = {}; diff --git a/packages/pinball_flame/lib/src/parent_is_a.dart b/packages/pinball_flame/lib/src/parent_is_a.dart index 19159c89..720a07b6 100644 --- a/packages/pinball_flame/lib/src/parent_is_a.dart +++ b/packages/pinball_flame/lib/src/parent_is_a.dart @@ -1,8 +1,5 @@ import 'package:flame/components.dart'; -// TODO(alestiago): Remove once the following is merged: -// https://github.com/flame-engine/flame/pull/1566 - /// A mixin that ensures a parent is of the given type [T]. mixin ParentIsA on Component { @override diff --git a/packages/pinball_flame/lib/src/sprite_animation.dart b/packages/pinball_flame/lib/src/sprite_animation.dart index 2990fb14..de39849f 100644 --- a/packages/pinball_flame/lib/src/sprite_animation.dart +++ b/packages/pinball_flame/lib/src/sprite_animation.dart @@ -9,8 +9,6 @@ import 'package:flutter/material.dart' hide Animation; /// {@template flame.widgets.sprite_animation_widget} /// A [StatelessWidget] that renders a [SpriteAnimation]. /// {@endtemplate} -// TODO(arturplaczek): Remove when this PR will be merged. -// https://github.com/flame-engine/flame/pull/1552 class SpriteAnimationWidget extends StatelessWidget { /// {@macro flame.widgets.sprite_animation_widget} const SpriteAnimationWidget({ diff --git a/packages/pinball_flame/test/src/sprite_animation_test.dart b/packages/pinball_flame/test/src/sprite_animation_test.dart index dc37d983..5483ee6e 100644 --- a/packages/pinball_flame/test/src/sprite_animation_test.dart +++ b/packages/pinball_flame/test/src/sprite_animation_test.dart @@ -10,9 +10,6 @@ class _MockSpriteAnimation extends Mock implements SpriteAnimation {} class _MockSprite extends Mock implements Sprite {} -// TODO(arturplaczek): Remove when this PR will be merged. -// https://github.com/flame-engine/flame/pull/1552 - void main() { group('PinballSpriteAnimationWidget', () { late SpriteAnimationController controller; diff --git a/test/game/behaviors/bonus_noise_behavior_test.dart b/test/game/behaviors/bonus_noise_behavior_test.dart index 5ec37bce..12f62545 100644 --- a/test/game/behaviors/bonus_noise_behavior_test.dart +++ b/test/game/behaviors/bonus_noise_behavior_test.dart @@ -126,7 +126,6 @@ void main() { await game.pump(behavior, player: player, bloc: bloc); }, verify: (_, __) async { - // TODO(erickzanardo): Change when the sound is implemented verifyNever(() => player.play(any())); }, ); @@ -152,7 +151,6 @@ void main() { await game.pump(behavior, player: player, bloc: bloc); }, verify: (_, __) async { - // TODO(erickzanardo): Change when the sound is implemented verifyNever(() => player.play(any())); }, ); @@ -178,7 +176,6 @@ void main() { await game.pump(behavior, player: player, bloc: bloc); }, verify: (_, __) async { - // TODO(erickzanardo): Change when the sound is implemented verifyNever(() => player.play(any())); }, ); diff --git a/test/game/view/widgets/bonus_animation_test.dart b/test/game/view/widgets/bonus_animation_test.dart index 52c1b3d8..5f67e968 100644 --- a/test/game/view/widgets/bonus_animation_test.dart +++ b/test/game/view/widgets/bonus_animation_test.dart @@ -68,9 +68,6 @@ void main() { }); }); - // TODO(arturplaczek): refactor this test when there is a new version of the - // flame with an onComplete callback in SpriteAnimationWidget - // https://github.com/flame-engine/flame/issues/1543 testWidgets('called onCompleted callback at the end of animation ', (tester) async { final callback = _MockCallback(); diff --git a/test/game/view/widgets/game_hud_test.dart b/test/game/view/widgets/game_hud_test.dart index f4054146..f4fe4b89 100644 --- a/test/game/view/widgets/game_hud_test.dart +++ b/test/game/view/widgets/game_hud_test.dart @@ -135,13 +135,9 @@ void main() { Stream.value(state), initialState: initialState, ); - await _pumpAppWithWidget(tester); await tester.pump(); - // TODO(arturplaczek): remove magic number once this is merged: - // https://github.com/flame-engine/flame/pull/1564 await Future.delayed(const Duration(seconds: 6)); - await expectLater(find.byType(ScoreView), findsOneWidget); }); }, diff --git a/test/helpers/mock_flame_images.dart b/test/helpers/mock_flame_images.dart index 48e4d40e..891ede7f 100644 --- a/test/helpers/mock_flame_images.dart +++ b/test/helpers/mock_flame_images.dart @@ -14,8 +14,6 @@ class _MockImages extends Mock implements Images {} /// Using real images blocks the tests, for this reason we need fake image /// everywhere we use [Images.fromCache] or [Images.load]. /// {@endtemplate} -// TODO(arturplaczek): need to find for a better solution for loading image -// or use original images. Future mockFlameImages() async { final image = await decodeImageFromList(Uint8List.fromList(_fakeImage)); final images = _MockImages();