fix: apply code review

pull/254/head
arturplaczek 3 years ago
parent d8ffa0693f
commit 1bdc0475b7

@ -24,6 +24,8 @@ class StartGameListener extends StatelessWidget {
return BlocListener<StartGameBloc, StartGameState>( return BlocListener<StartGameBloc, StartGameState>(
listener: (context, state) { listener: (context, state) {
switch (state.status) { switch (state.status) {
case StartGameStatus.initial:
break;
case StartGameStatus.selectCharacter: case StartGameStatus.selectCharacter:
_onSelectCharacter(context); _onSelectCharacter(context);
break; break;
@ -33,8 +35,6 @@ class StartGameListener extends StatelessWidget {
case StartGameStatus.play: case StartGameStatus.play:
_game.gameFlowController.start(); _game.gameFlowController.start();
break; break;
case StartGameStatus.initial:
break;
} }
}, },
child: _child, child: _child,

@ -26,7 +26,7 @@ void main() {
expect(find.text('Play'), findsOneWidget); expect(find.text('Play'), findsOneWidget);
}); });
testWidgets('calls PlayTapped event to StartGameBloc when taped on play', testWidgets('adds PlayTapped event to StartGameBloc when taped',
(tester) async { (tester) async {
await tester.pumpApp( await tester.pumpApp(
const PlayButtonOverlay(), const PlayButtonOverlay(),

@ -87,7 +87,7 @@ void main() {
.called(1); .called(1);
}); });
testWidgets('calls CharacterSelected event when start is tapped', testWidgets('adds CharacterSelected event when start is tapped',
(tester) async { (tester) async {
whenListen( whenListen(
startGameBloc, startGameBloc,

Loading…
Cancel
Save