@@ -69,7 +69,7 @@ class MatchDetailsView extends StatelessWidget {
6969 } else if (state is MatchDetailsError ) {
7070 ScaffoldMessenger .of (context).showSnackBar (
7171 SnackBar (
72- content: Text ('Error: ${ state .error }' ),
72+ content: Text (context.l10n. errorSnackbarMessage ( state.error) ),
7373 backgroundColor: Colors .red,
7474 duration: const Duration (seconds: 2 ),
7575 ),
@@ -479,7 +479,7 @@ class MatchStandingsWidget extends StatelessWidget {
479479 Expanded (
480480 flex: 2 ,
481481 child: Text (
482- 'Achievement' ,
482+ context.l10n.achievementColumnHeader ,
483483 style: Theme .of (context).textTheme.titleSmall? .copyWith (
484484 color: Theme .of (context).colorScheme.secondary,
485485 ),
@@ -513,48 +513,40 @@ class MatchStandingsWidget extends StatelessWidget {
513513 ),
514514 Expanded (
515515 flex: 2 ,
516- child: Wrap (
516+ child: Row (
517517 spacing: 8 ,
518518 children: [
519- if (player.firebaseId = = currentUserFirebaseId)
520- const Tooltip (
521- triggerMode : TooltipTriggerMode .tap ,
522- message : 'You' ,
523- child : Icon (
524- Icons .person ,
525- color : Colors .blue ,
519+ if (player.firebaseId ! = currentUserFirebaseId)
520+ IconButton (
521+ onPressed : () => onSelectPlayer (player) ,
522+ icon : const FaIcon (
523+ FontAwesomeIcons .userPlus,
524+ color : Colors .grey ,
525+ size : 16 ,
526526 ),
527527 ),
528- if (player.id == winner.id )
529- const Tooltip (
528+ if (player.firebaseId == currentUserFirebaseId )
529+ Tooltip (
530530 triggerMode: TooltipTriggerMode .tap,
531- message: 'Winner' ,
532- child: Icon (
533- Icons .emoji_events,
534- color: Colors .amber,
535- size: 16 ,
531+ message: l10n.youTooltip,
532+ child: const IconButton (
533+ icon: Icon (
534+ Icons .person,
535+ color: Colors .blue,
536+ ),
537+ onPressed: null ,
536538 ),
537539 ),
538540 if (player.id == startingPlayerId)
539- const Tooltip (
541+ Tooltip (
540542 triggerMode: TooltipTriggerMode .tap,
541- message: 'Went First' ,
542- child: FaIcon (
543+ message: l10n.wentFirstTooltip ,
544+ child: const FaIcon (
543545 FontAwesomeIcons .one,
544546 color: Colors .green,
545547 size: 16 ,
546548 ),
547549 ),
548- if (player.firebaseId != currentUserFirebaseId)
549- const Tooltip (
550- triggerMode: TooltipTriggerMode .tap,
551- message: 'Went First' ,
552- child: FaIcon (
553- FontAwesomeIcons .userPlus,
554- color: Colors .grey,
555- size: 16 ,
556- ),
557- ),
558550 ],
559551 ),
560552 ),
@@ -668,17 +660,17 @@ class _DeleteMatchButton extends StatelessWidget {
668660 child: StatefulBuilder (
669661 builder: (context, setState) {
670662 return AlertDialog (
671- title: const Text ('Delete Match' ),
672- content: const Text (
673- 'Are you sure you want to delete this match?' ,
663+ title: Text (context.l10n.deleteMatchDialogTitle ),
664+ content: Text (
665+ context.l10n.deleteMatchDialogContent ,
674666 ),
675667 actions: [
676668 ElevatedButton (
677669 onPressed: () => context.pop (),
678- child: const Text ('Cancel' ),
670+ child: Text (context.l10n.cancelButtonLabel ),
679671 ),
680672 HoldToConfirmButton (
681- child: const Text ('Delete Match' ),
673+ child: Text (context.l10n.deleteMatchButtonLabel ),
682674 onProgressCompleted: () async {
683675 context.read <MatchDetailsBloc >().add (
684676 DeleteMatchEvent (
0 commit comments