Updated scrolling to one ScrollView and removed scrolling on listViews

This commit is contained in:
2025-06-12 11:03:29 +02:00
parent 4695cb2261
commit 9d4a0fcfce
3 changed files with 93 additions and 89 deletions

View File

@@ -52,9 +52,9 @@
</Testables> </Testables>
</TestAction> </TestAction>
<LaunchAction <LaunchAction
buildConfiguration = "Release" buildConfiguration = "Debug"
selectedDebuggerIdentifier = "" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit" customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
launchStyle = "0" launchStyle = "0"
useCustomWorkingDirectory = "NO" useCustomWorkingDirectory = "NO"

View File

@@ -24,6 +24,7 @@ class _ActiveGameViewState extends State<ActiveGameView> {
middle: Text(widget.gameSession.gameTitle), middle: Text(widget.gameSession.gameTitle),
), ),
child: SafeArea( child: SafeArea(
child: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@@ -36,6 +37,7 @@ class _ActiveGameViewState extends State<ActiveGameView> {
), ),
ListView.builder( ListView.builder(
shrinkWrap: true, shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemCount: widget.gameSession.players.length, itemCount: widget.gameSession.players.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
int playerIndex = sortedPlayerIndices[index]; int playerIndex = sortedPlayerIndices[index];
@@ -46,8 +48,8 @@ class _ActiveGameViewState extends State<ActiveGameView> {
const SizedBox(width: 5), const SizedBox(width: 5),
Text( Text(
widget.gameSession.players[playerIndex], widget.gameSession.players[playerIndex],
style: style: const TextStyle(
const TextStyle(fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
], ],
), ),
@@ -71,6 +73,7 @@ class _ActiveGameViewState extends State<ActiveGameView> {
), ),
ListView.builder( ListView.builder(
shrinkWrap: true, shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemCount: widget.gameSession.roundNumber, itemCount: widget.gameSession.roundNumber,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return Padding( return Padding(
@@ -81,7 +84,8 @@ class _ActiveGameViewState extends State<ActiveGameView> {
), ),
trailing: index + 1 != trailing: index + 1 !=
widget.gameSession.roundNumber || widget.gameSession.roundNumber ||
widget.gameSession.isGameFinished == true widget.gameSession.isGameFinished ==
true
? (const Text('\u{2705}', ? (const Text('\u{2705}',
style: TextStyle(fontSize: 22))) style: TextStyle(fontSize: 22)))
: const Text('\u{23F3}', : const Text('\u{23F3}',
@@ -105,7 +109,7 @@ class _ActiveGameViewState extends State<ActiveGameView> {
], ],
), ),
), ),
); ));
}); });
} }

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.2.7+198 version: 0.2.8+201
environment: environment:
sdk: ^3.5.4 sdk: ^3.5.4