chore: remove TODO comments form the codebase (#373)

Co-authored-by: Tom Arra <tarra3@gmail.com>
pull/382/head
Jorge Coca 2 years ago committed by GitHub
parent 698085a79c
commit b8f26b81de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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;
}
},

@ -11,10 +11,6 @@ class AndroidSpaceshipBonusBehavior extends Component
void onMount() {
super.onMount();
final androidSpaceship = parent.firstChild<AndroidSpaceship>()!;
// 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;

@ -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({

@ -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()

@ -11,10 +11,6 @@ class ChromeDinoBonusBehavior extends Component
void onMount() {
super.onMount();
final chromeDino = parent.firstChild<ChromeDino>()!;
// 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;

@ -25,9 +25,6 @@ class FlutterForestBonusBehavior extends Component
final canvas = gameRef.descendants().whereType<ZCanvasComponent>().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,

@ -13,9 +13,6 @@ class GoogleWordBonusBehavior extends Component
final googleLetters = parent.children.whereType<GoogleLetter>();
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);

@ -13,10 +13,6 @@ class SparkyComputerBonusBehavior extends Component
super.onMount();
final sparkyComputer = parent.firstChild<SparkyComputer>()!;
final animatronic = parent.firstChild<SparkyAnimatronic>()!;
// 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;

@ -253,7 +253,6 @@ class PreviewLine extends PositionComponent with HasGameRef<DebugPinballGame> {
}
}
// TODO(wolfenrain): investigate this CI failure.
class _DebugInformation extends Component with HasGameRef<DebugPinballGame> {
@override
PositionType get positionType => PositionType.widget;

@ -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';

@ -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';

@ -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;

@ -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<Component>? 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()

@ -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()

@ -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);

@ -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;

@ -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;

@ -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

@ -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 [

@ -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;

@ -24,8 +24,6 @@ mixin InitialPosition on BodyComponent {
@override
Future<void> 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.',

@ -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<KickerState>
@override
Future<void> 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<KickerState>
}
}
// TODO(alestiago): Evaluate if there's value on generalising this to
// all shapes.
extension on Shape {
void moveBy(Vector2 offset) {
if (this is CircleShape) {

@ -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<FixtureDef> _createFixtureDefs() {
final fixturesDef = <FixtureDef>[];

@ -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;

@ -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

@ -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;

@ -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;

@ -178,26 +178,16 @@ class _PlungerSpriteAnimationGroupComponent
@override
Future<void> 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,

@ -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.

@ -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].

@ -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;

@ -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;

@ -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;

@ -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<void> 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);

@ -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<Component>? 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;

@ -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;

@ -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();

@ -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();

@ -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();

@ -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();

@ -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 {

@ -102,8 +102,6 @@ void main() {
expect(() => GoogleLetter(6), throwsA(isA<RangeError>()));
});
// 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();

@ -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();

@ -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();

@ -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();

@ -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();

@ -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<T extends BodyComponent> extends Component
with ContactCallbacks, ParentIsA<T> {
final _fixturesUserData = <Object>{};

@ -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<T extends Component> on Component {
@override

@ -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({

@ -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;

@ -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()));
},
);

@ -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();

@ -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<void>.delayed(const Duration(seconds: 6));
await expectLater(find.byType(ScoreView), findsOneWidget);
});
},

@ -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<void> mockFlameImages() async {
final image = await decodeImageFromList(Uint8List.fromList(_fakeImage));
final images = _MockImages();

Loading…
Cancel
Save