Skip to content

Commit

Permalink
Allow user to access settings screen while loading broadcast game screen
Browse files Browse the repository at this point in the history
  • Loading branch information
julien4215 committed Jan 10, 2025
1 parent 21f0699 commit 4a6b85e
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions lib/src/view/broadcast/broadcast_game_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,6 @@ class _BroadcastGameScreenState extends ConsumerState<BroadcastGameScreen>

@override
Widget build(BuildContext context) {
final hasValue = ref.watch(
broadcastGameControllerProvider(
widget.roundId,
widget.gameId,
).select((state) => state.hasValue),
);
final title =
(widget.title != null)
? Text(widget.title!, overflow: TextOverflow.ellipsis, maxLines: 1)
Expand All @@ -99,15 +93,12 @@ class _BroadcastGameScreenState extends ConsumerState<BroadcastGameScreen>
actions: [
AppBarAnalysisTabIndicator(tabs: tabs, controller: _tabController),
AppBarIconButton(
onPressed:
hasValue
? () {
pushPlatformRoute(
context,
screen: BroadcastGameSettings(widget.roundId, widget.gameId),
);
}
: null,
onPressed: () {
pushPlatformRoute(
context,
screen: BroadcastGameSettings(widget.roundId, widget.gameId),
);
},
semanticsLabel: context.l10n.settingsSettings,
icon: const Icon(Icons.settings),
),
Expand Down

0 comments on commit 4a6b85e

Please sign in to comment.