Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
feat: display no PauseButton when not playing
Browse files Browse the repository at this point in the history
  • Loading branch information
alestiago committed Feb 17, 2024
1 parent 4de12b0 commit a739f25
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/trashy_road/lib/src/game/view/game_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ class _GameView extends StatelessWidget {
return current.status == GameStatus.playing;
},
builder: (context, state) {
if (state.status != GameStatus.playing) {
return const SizedBox.shrink();
}

return PauseButton(
onPause: () {
gameBloc.add(const GamePausedEvent());
Expand Down

0 comments on commit a739f25

Please sign in to comment.