refactor: fixed typos

pull/434/head
alestiago 3 years ago
parent 4ef2140e09
commit 81862f9a47

@ -12,13 +12,13 @@ import 'package:pinball_components/pinball_components.dart';
class _TestGame extends Forge2DGame { class _TestGame extends Forge2DGame {
Future<void> pump( Future<void> pump(
PlungerKeyControllingBehavior child, { PlungerKeyControllingBehavior child, {
PlungerCubit? plugerBloc, PlungerCubit? plungerBloc,
}) async { }) async {
final plunger = Plunger.test(); final plunger = Plunger.test();
await ensureAdd(plunger); await ensureAdd(plunger);
return plunger.ensureAdd( return plunger.ensureAdd(
FlameBlocProvider<PlungerCubit, PlungerState>.value( FlameBlocProvider<PlungerCubit, PlungerState>.value(
value: plugerBloc ?? _MockPlungerCubit(), value: plungerBloc ?? _MockPlungerCubit(),
children: [child], children: [child],
), ),
); );
@ -73,7 +73,7 @@ void main() {
final behavior = PlungerKeyControllingBehavior(); final behavior = PlungerKeyControllingBehavior();
await game.pump( await game.pump(
behavior, behavior,
plugerBloc: plungerBloc, plungerBloc: plungerBloc,
); );
final event = _MockRawKeyDownEvent(); final event = _MockRawKeyDownEvent();
@ -93,7 +93,7 @@ void main() {
final behavior = PlungerKeyControllingBehavior(); final behavior = PlungerKeyControllingBehavior();
await game.pump( await game.pump(
behavior, behavior,
plugerBloc: plungerBloc, plungerBloc: plungerBloc,
); );
final event = _MockRawKeyDownEvent(); final event = _MockRawKeyDownEvent();
@ -113,7 +113,7 @@ void main() {
final behavior = PlungerKeyControllingBehavior(); final behavior = PlungerKeyControllingBehavior();
await game.pump( await game.pump(
behavior, behavior,
plugerBloc: plungerBloc, plungerBloc: plungerBloc,
); );
final event = _MockRawKeyDownEvent(); final event = _MockRawKeyDownEvent();
@ -135,7 +135,7 @@ void main() {
final behavior = PlungerKeyControllingBehavior(); final behavior = PlungerKeyControllingBehavior();
await game.pump( await game.pump(
behavior, behavior,
plugerBloc: plungerBloc, plungerBloc: plungerBloc,
); );
final event = _MockRawKeyUpEvent(); final event = _MockRawKeyUpEvent();
@ -155,7 +155,7 @@ void main() {
final behavior = PlungerKeyControllingBehavior(); final behavior = PlungerKeyControllingBehavior();
await game.pump( await game.pump(
behavior, behavior,
plugerBloc: plungerBloc, plungerBloc: plungerBloc,
); );
final event = _MockRawKeyUpEvent(); final event = _MockRawKeyUpEvent();
@ -175,7 +175,7 @@ void main() {
final behavior = PlungerKeyControllingBehavior(); final behavior = PlungerKeyControllingBehavior();
await game.pump( await game.pump(
behavior, behavior,
plugerBloc: plungerBloc, plungerBloc: plungerBloc,
); );
final event = _MockRawKeyUpEvent(); final event = _MockRawKeyUpEvent();

@ -13,13 +13,13 @@ import 'package:pinball_components/pinball_components.dart';
class _TestGame extends Forge2DGame { class _TestGame extends Forge2DGame {
Future<void> pump( Future<void> pump(
PlungerPullingBehavior behavior, { PlungerPullingBehavior behavior, {
PlungerCubit? plugerBloc, PlungerCubit? plungerBloc,
}) async { }) async {
final plunger = Plunger.test(); final plunger = Plunger.test();
await ensureAdd(plunger); await ensureAdd(plunger);
return plunger.ensureAdd( return plunger.ensureAdd(
FlameBlocProvider<PlungerCubit, PlungerState>.value( FlameBlocProvider<PlungerCubit, PlungerState>.value(
value: plugerBloc ?? _MockPlungerCubit(), value: plungerBloc ?? _MockPlungerCubit(),
children: [behavior], children: [behavior],
), ),
); );
@ -64,7 +64,7 @@ void main() {
); );
await game.pump( await game.pump(
behavior, behavior,
plugerBloc: plungerBloc, plungerBloc: plungerBloc,
); );
game.update(0); game.update(0);
@ -105,7 +105,7 @@ void main() {
); );
await game.pump( await game.pump(
behavior, behavior,
plugerBloc: plungerBloc, plungerBloc: plungerBloc,
); );
final plunger = behavior.ancestors().whereType<Plunger>().single; final plunger = behavior.ancestors().whereType<Plunger>().single;
final joint = _MockPrismaticJoint(); final joint = _MockPrismaticJoint();
@ -136,7 +136,7 @@ void main() {
); );
await game.pump( await game.pump(
behavior, behavior,
plugerBloc: plungerBloc, plungerBloc: plungerBloc,
); );
final plunger = behavior.ancestors().whereType<Plunger>().single; final plunger = behavior.ancestors().whereType<Plunger>().single;
final joint = _MockPrismaticJoint(); final joint = _MockPrismaticJoint();

@ -13,13 +13,13 @@ import 'package:pinball_components/pinball_components.dart';
class _TestGame extends Forge2DGame { class _TestGame extends Forge2DGame {
Future<void> pump( Future<void> pump(
PlungerReleasingBehavior behavior, { PlungerReleasingBehavior behavior, {
PlungerCubit? plugerBloc, PlungerCubit? plungerBloc,
}) async { }) async {
final plunger = Plunger.test(); final plunger = Plunger.test();
await ensureAdd(plunger); await ensureAdd(plunger);
return plunger.ensureAdd( return plunger.ensureAdd(
FlameBlocProvider<PlungerCubit, PlungerState>.value( FlameBlocProvider<PlungerCubit, PlungerState>.value(
value: plugerBloc ?? PlungerCubit(), value: plungerBloc ?? PlungerCubit(),
children: [behavior], children: [behavior],
), ),
); );
@ -58,7 +58,7 @@ void main() {
final behavior = PlungerReleasingBehavior(strength: 2); final behavior = PlungerReleasingBehavior(strength: 2);
await game.pump( await game.pump(
behavior, behavior,
plugerBloc: plungerBloc, plungerBloc: plungerBloc,
); );
streamController.add(PlungerState.releasing); streamController.add(PlungerState.releasing);

Loading…
Cancel
Save