Skip to content

Commit

Permalink
Fix snackbar duration
Browse files Browse the repository at this point in the history
  • Loading branch information
Carapacik committed Nov 28, 2023
1 parent 799b047 commit eaf6a4a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions lib/src/feature/game/bloc/game_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,17 @@ class GameBloc extends Bloc<GameEvent, GameState> {
lvlNumber: state.lvlNumber,
),
);
emit(
GameState.idle(
dictionary: state.dictionary,
secretWord: state.secretWord,
gameMode: state.gameMode,
gameCompleted: state.gameCompleted,
board: state.board,
statuses: state.statuses,
lvlNumber: state.lvlNumber,
),
);
return;
}
final word =
Expand All @@ -340,6 +351,17 @@ class GameBloc extends Bloc<GameEvent, GameState> {
lvlNumber: state.lvlNumber,
),
);
emit(
GameState.idle(
dictionary: state.dictionary,
secretWord: state.secretWord,
gameMode: state.gameMode,
gameCompleted: state.gameCompleted,
board: state.board,
statuses: state.statuses,
lvlNumber: state.lvlNumber,
),
);
return;
}
if (word.join() == state.secretWord) {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/feature/game/widget/game_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class GameBody extends StatelessWidget {
style: TextStyle(color: LetterStatus.unknown.textColor(context), fontSize: 16),
textAlign: TextAlign.center,
),
duration: const Duration(milliseconds: 500),
duration: const Duration(seconds: 2),
behavior: SnackBarBehavior.floating,
dismissDirection: DismissDirection.up,
width: 350,
Expand Down

0 comments on commit eaf6a4a

Please sign in to comment.