diff --git a/lib/presentation/views/main_menu/match_view/match_result_view.dart b/lib/presentation/views/main_menu/match_view/match_result_view.dart index 0c991f1..357012c 100644 --- a/lib/presentation/views/main_menu/match_view/match_result_view.dart +++ b/lib/presentation/views/main_menu/match_view/match_result_view.dart @@ -110,6 +110,7 @@ class _MatchResultViewState extends State { children: [ Expanded( child: isLiveEditMode && rulesetSupportsScoreEntry() + // Live Edit Mode ? ListView.builder( itemCount: allPlayers.length, itemBuilder: (context, index) { @@ -124,6 +125,7 @@ class _MatchResultViewState extends State { ); }, ) + // Normal Mode : Container( margin: const EdgeInsets.symmetric( horizontal: 12, @@ -150,6 +152,8 @@ class _MatchResultViewState extends State { ), ), const SizedBox(height: 10), + + // Show player selection if (rulesetSupportsWinnerSelection()) Expanded( child: RadioGroup( @@ -182,6 +186,7 @@ class _MatchResultViewState extends State { ), ), ), + // Show score entry if (rulesetSupportsScoreEntry()) Expanded( child: ListView.separated( diff --git a/lib/presentation/widgets/tiles/match_result_view/live_edit_list_tile.dart b/lib/presentation/widgets/tiles/match_result_view/live_edit_list_tile.dart index 4021755..80243b8 100644 --- a/lib/presentation/widgets/tiles/match_result_view/live_edit_list_tile.dart +++ b/lib/presentation/widgets/tiles/match_result_view/live_edit_list_tile.dart @@ -35,32 +35,35 @@ class _LiveEditListTileState extends State { @override Widget build(BuildContext context) { return Container( - padding: const EdgeInsets.symmetric(vertical: 10), + padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 20), margin: const EdgeInsets.symmetric(vertical: 12, horizontal: 8), decoration: CustomTheme.standardBoxDecoration, - child: Column( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, children: [ - Text( - widget.title, - style: const TextStyle(fontSize: 14, fontWeight: FontWeight.bold), + MainMenuButton( + onPressed: () => _score > minScore + ? { + setState(() { + _score--; + if (widget.onChanged != null) { + widget.onChanged!(_score); + } + }), + } + : null, + icon: Icons.remove_rounded, ), - Padding( - padding: const EdgeInsets.only(left: 20, right: 20, bottom: 10), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + Expanded( + child: Column( children: [ - MainMenuButton( - onPressed: () => _score > minScore - ? { - setState(() { - _score--; - if (widget.onChanged != null) { - widget.onChanged!(_score); - } - }), - } - : null, - icon: Icons.remove_rounded, + Text( + widget.title, + style: const TextStyle( + fontSize: 14, + fontWeight: FontWeight.bold, + ), ), SizedBox( width: 150, @@ -68,28 +71,33 @@ class _LiveEditListTileState extends State { _score.toString(), maxLines: 1, textAlign: TextAlign.center, + textWidthBasis: TextWidthBasis.longestLine, + textHeightBehavior: const TextHeightBehavior( + applyHeightToFirstAscent: false, + applyHeightToLastDescent: false, + ), style: const TextStyle( fontSize: 48, fontWeight: FontWeight.w600, ), ), ), - MainMenuButton( - onPressed: () => _score < maxScore - ? { - setState(() { - _score++; - if (widget.onChanged != null) { - widget.onChanged!(_score); - } - }), - } - : null, - icon: Icons.add_rounded, - ), ], ), ), + MainMenuButton( + onPressed: () => _score < maxScore + ? { + setState(() { + _score++; + if (widget.onChanged != null) { + widget.onChanged!(_score); + } + }), + } + : null, + icon: Icons.add_rounded, + ), ], ), );