Skip to content

Commit

Permalink
Fade in buttons, no label
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimima committed Nov 14, 2024
1 parent 4ac1342 commit b0d9fc5
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions lib/src/view/game/game_result_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,27 +132,36 @@ class _GameEndDialogState extends ConsumerState<GameResultDialog> {
context.l10n.cancelRematchOffer,
textAlign: TextAlign.center,
),
)
else if (gameState.game.opponent?.offeringRematch == true)
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// Text("Rematch offered"),
FatButton(
),
Visibility(
maintainState: true,
visible: gameState.game.opponent?.offeringRematch ?? false,
child: AnimatedOpacity(
duration: const Duration(milliseconds: 300),
opacity: gameState.game.opponent?.offeringRematch ?? false ? 1 : 0,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
FatButton(
semanticsLabel: context.l10n.rematch,
child: const Text('Accept rematch'),
onPressed: () {
ref.read(ctrlProvider.notifier).proposeOrAcceptRematch();
},),
SecondaryButton(
},
),
SecondaryButton(
semanticsLabel: context.l10n.rematch,
child: const Text('Decline'),
onPressed: () {
ref.read(ctrlProvider.notifier).declineRematch();
},),
],
)
else if (gameState.canOfferRematch)
},
),
],
),
),
),
if (gameState.canOfferRematch &&
!(gameState.game.opponent?.offeringRematch ?? false))
SecondaryButton(
semanticsLabel: context.l10n.rematch,
onPressed: _activateButtons &&
Expand Down

0 comments on commit b0d9fc5

Please sign in to comment.