Updated LiveEditListTile
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 46s
Pull Request Pipeline / lint (pull_request) Successful in 48s

This commit is contained in:
2026-05-06 20:18:46 +02:00
parent 4037a961d1
commit 013fd29182
2 changed files with 47 additions and 34 deletions

View File

@@ -110,6 +110,7 @@ class _MatchResultViewState extends State<MatchResultView> {
children: [
Expanded(
child: isLiveEditMode && rulesetSupportsScoreEntry()
// Live Edit Mode
? ListView.builder(
itemCount: allPlayers.length,
itemBuilder: (context, index) {
@@ -124,6 +125,7 @@ class _MatchResultViewState extends State<MatchResultView> {
);
},
)
// Normal Mode
: Container(
margin: const EdgeInsets.symmetric(
horizontal: 12,
@@ -150,6 +152,8 @@ class _MatchResultViewState extends State<MatchResultView> {
),
),
const SizedBox(height: 10),
// Show player selection
if (rulesetSupportsWinnerSelection())
Expanded(
child: RadioGroup<Player>(
@@ -182,6 +186,7 @@ class _MatchResultViewState extends State<MatchResultView> {
),
),
),
// Show score entry
if (rulesetSupportsScoreEntry())
Expanded(
child: ListView.separated(

View File

@@ -35,19 +35,12 @@ class _LiveEditListTileState extends State<LiveEditListTile> {
@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(
children: [
Text(
widget.title,
style: const TextStyle(fontSize: 14, fontWeight: FontWeight.bold),
),
Padding(
padding: const EdgeInsets.only(left: 20, right: 20, bottom: 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
MainMenuButton(
onPressed: () => _score > minScore
@@ -62,18 +55,36 @@ class _LiveEditListTileState extends State<LiveEditListTile> {
: null,
icon: Icons.remove_rounded,
),
Expanded(
child: Column(
children: [
Text(
widget.title,
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
),
),
SizedBox(
width: 150,
child: NumericText(
_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
? {
@@ -89,9 +100,6 @@ class _LiveEditListTileState extends State<LiveEditListTile> {
),
],
),
),
],
),
);
}
}