Removed title row and changed segmendetControl Padding

This commit is contained in:
2025-07-19 17:28:19 +02:00
parent 81ada1c810
commit 5b704d3937
2 changed files with 28 additions and 94 deletions

View File

@@ -115,7 +115,7 @@ class _RoundViewState extends State<RoundView> {
vertical: 10, vertical: 10,
), ),
child: SizedBox( child: SizedBox(
height: 40, height: 60,
child: CupertinoSegmentedControl<int>( child: CupertinoSegmentedControl<int>(
unselectedColor: CustomTheme.backgroundTintColor, unselectedColor: CustomTheme.backgroundTintColor,
selectedColor: CustomTheme.primaryColor, selectedColor: CustomTheme.primaryColor,
@@ -131,7 +131,7 @@ class _RoundViewState extends State<RoundView> {
Padding( Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 6, horizontal: 6,
vertical: 6, vertical: 8,
), ),
child: FittedBox( child: FittedBox(
fit: BoxFit.scaleDown, fit: BoxFit.scaleDown,
@@ -155,27 +155,6 @@ class _RoundViewState extends State<RoundView> {
), ),
), ),
), ),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20.0),
child: CupertinoListTile(
title: Text(AppLocalizations.of(context).player),
trailing: Row(
children: [
SizedBox(
width: 100,
child: Center(
child: Text(
AppLocalizations.of(context).points))),
const SizedBox(width: 20),
SizedBox(
width: 80,
child: Center(
child: Text(AppLocalizations.of(context)
.kamikaze))),
],
),
),
),
ListView.builder( ListView.builder(
shrinkWrap: true, shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
@@ -212,9 +191,7 @@ class _RoundViewState extends State<RoundView> {
subtitle: Text( subtitle: Text(
'${widget.gameSession.playerScores[originalIndex]}' '${widget.gameSession.playerScores[originalIndex]}'
' ${AppLocalizations.of(context).points}'), ' ${AppLocalizations.of(context).points}'),
trailing: Row( trailing: SizedBox(
children: [
SizedBox(
width: 100, width: 100,
child: CupertinoTextField( child: CupertinoTextField(
maxLength: 3, maxLength: 3,
@@ -228,9 +205,7 @@ class _RoundViewState extends State<RoundView> {
FilteringTextInputFormatter.digitsOnly, FilteringTextInputFormatter.digitsOnly,
], ],
textInputAction: index == textInputAction: index ==
widget.gameSession.players widget.gameSession.players.length - 1
.length -
1
? TextInputAction.done ? TextInputAction.done
: TextInputAction.next, : TextInputAction.next,
controller: controller:
@@ -243,47 +218,6 @@ class _RoundViewState extends State<RoundView> {
onChanged: (_) => setState(() {}), onChanged: (_) => setState(() {}),
), ),
), ),
const SizedBox(width: 50),
GestureDetector(
onTap: () {
setState(() {
_kamikazePlayerIndex =
(_kamikazePlayerIndex ==
originalIndex)
? null
: originalIndex;
});
},
child: Container(
width: 24,
height: 24,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: _kamikazePlayerIndex ==
originalIndex
? CupertinoColors.systemRed
: CupertinoColors
.tertiarySystemFill,
border: Border.all(
color: _kamikazePlayerIndex ==
originalIndex
? CupertinoColors.systemRed
: CupertinoColors.systemGrey,
),
),
child: _kamikazePlayerIndex ==
originalIndex
? const Icon(
CupertinoIcons.exclamationmark,
size: 16,
color: CupertinoColors.white,
)
: null,
),
),
const SizedBox(width: 22),
],
),
), ),
), ),
); );

View File

@@ -2,7 +2,7 @@ name: cabo_counter
description: "Mobile app for the card game Cabo" description: "Mobile app for the card game Cabo"
publish_to: 'none' publish_to: 'none'
version: 0.4.8+526 version: 0.4.8+529
environment: environment:
sdk: ^3.5.4 sdk: ^3.5.4