fix: apply code review

pull/184/head
arturplaczek 3 years ago
parent d2a46dc509
commit af65374aa6

@ -21,10 +21,10 @@ class StartGameBloc extends Bloc<StartGameEvent, StartGameState> {
final PinballGame _game;
Future<void> _onSelectCharacter(
void _onSelectCharacter(
SelectCharacter event,
Emitter emit,
) async {
Emitter<StartGameState> emit,
) {
_game.gameFlowController.start();
emit(
@ -34,10 +34,10 @@ class StartGameBloc extends Bloc<StartGameEvent, StartGameState> {
);
}
Future<void> _onHowToPlay(
void _onHowToPlay(
HowToPlay event,
Emitter emit,
) async {
Emitter<StartGameState> emit,
) {
emit(
state.copyWith(
status: StartGameStatus.howToPlay,
@ -45,10 +45,10 @@ class StartGameBloc extends Bloc<StartGameEvent, StartGameState> {
);
}
Future<void> _onPlay(
void _onPlay(
Play event,
Emitter emit,
) async {
Emitter<StartGameState> emit,
) {
emit(
state.copyWith(
status: StartGameStatus.play,

@ -6,16 +6,37 @@ part of 'start_game_bloc.dart';
abstract class StartGameEvent extends Equatable {
/// {@macro start_game_event}
const StartGameEvent();
}
/// {@template select_character}
/// Select character event.
/// {@endtemplate}
class SelectCharacter extends StartGameEvent {
/// {@macro select_character}
const SelectCharacter();
@override
List<Object> get props => [];
}
/// Select character event.
class SelectCharacter extends StartGameEvent {}
/// {@template how_to_play}
/// How to play event.
class HowToPlay extends StartGameEvent {}
/// {@endtemplate}
class HowToPlay extends StartGameEvent {
/// {@macro how_to_play}
const HowToPlay();
@override
List<Object> get props => [];
}
/// {@template play}
/// Play event.
class Play extends StartGameEvent {}
/// {@endtemplate}
class Play extends StartGameEvent {
/// {@macro play}
const Play();
@override
List<Object> get props => [];
}

@ -40,7 +40,5 @@ class StartGameState extends Equatable {
}
@override
List<Object> get props => [
status,
];
List<Object> get props => [status];
}

Loading…
Cancel
Save