From a739f2562f73ae030445a56244f59b511fec8cb7 Mon Sep 17 00:00:00 2001 From: alestiago Date: Sat, 17 Feb 2024 08:19:00 +0000 Subject: [PATCH] feat: display no PauseButton when not playing --- packages/trashy_road/lib/src/game/view/game_page.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/trashy_road/lib/src/game/view/game_page.dart b/packages/trashy_road/lib/src/game/view/game_page.dart index eeae36af..26882860 100644 --- a/packages/trashy_road/lib/src/game/view/game_page.dart +++ b/packages/trashy_road/lib/src/game/view/game_page.dart @@ -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());