Merge pull request #51 from flixcoo/bug/42-bug-when-scrolling-in-round-overview
Updated scrolling to one ScrollView and removed scrolling on listViews
This commit is contained in:
@@ -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"
|
||||||
|
|||||||
@@ -20,92 +20,96 @@ class _ActiveGameViewState extends State<ActiveGameView> {
|
|||||||
builder: (context, _) {
|
builder: (context, _) {
|
||||||
List<int> sortedPlayerIndices = _getSortedPlayerIndices();
|
List<int> sortedPlayerIndices = _getSortedPlayerIndices();
|
||||||
return CupertinoPageScaffold(
|
return CupertinoPageScaffold(
|
||||||
navigationBar: CupertinoNavigationBar(
|
navigationBar: CupertinoNavigationBar(
|
||||||
middle: Text(widget.gameSession.gameTitle),
|
middle: Text(widget.gameSession.gameTitle),
|
||||||
),
|
|
||||||
child: SafeArea(
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(10, 10, 0, 0),
|
|
||||||
child: Text(
|
|
||||||
'Spieler:innen',
|
|
||||||
style: CustomTheme.rowTitle,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
ListView.builder(
|
|
||||||
shrinkWrap: true,
|
|
||||||
itemCount: widget.gameSession.players.length,
|
|
||||||
itemBuilder: (BuildContext context, int index) {
|
|
||||||
int playerIndex = sortedPlayerIndices[index];
|
|
||||||
return CupertinoListTile(
|
|
||||||
title: Row(
|
|
||||||
children: [
|
|
||||||
_getPlacementPrefix(index),
|
|
||||||
const SizedBox(width: 5),
|
|
||||||
Text(
|
|
||||||
widget.gameSession.players[playerIndex],
|
|
||||||
style:
|
|
||||||
const TextStyle(fontWeight: FontWeight.bold),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
trailing: Row(
|
|
||||||
children: [
|
|
||||||
const SizedBox(width: 5),
|
|
||||||
Text(
|
|
||||||
'${widget.gameSession.playerScores[playerIndex]} '
|
|
||||||
'Punkte')
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(10, 10, 0, 0),
|
|
||||||
child: Text(
|
|
||||||
'Runden',
|
|
||||||
style: CustomTheme.rowTitle,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
ListView.builder(
|
|
||||||
shrinkWrap: true,
|
|
||||||
itemCount: widget.gameSession.roundNumber,
|
|
||||||
itemBuilder: (BuildContext context, int index) {
|
|
||||||
return Padding(
|
|
||||||
padding: const EdgeInsets.all(1),
|
|
||||||
child: CupertinoListTile(
|
|
||||||
title: Text(
|
|
||||||
'Runde ${index + 1}',
|
|
||||||
),
|
|
||||||
trailing: index + 1 !=
|
|
||||||
widget.gameSession.roundNumber ||
|
|
||||||
widget.gameSession.isGameFinished == true
|
|
||||||
? (const Text('\u{2705}',
|
|
||||||
style: TextStyle(fontSize: 22)))
|
|
||||||
: const Text('\u{23F3}',
|
|
||||||
style: TextStyle(fontSize: 22)),
|
|
||||||
onTap: () async {
|
|
||||||
// ignore: unused_local_variable
|
|
||||||
final val = await Navigator.of(context,
|
|
||||||
rootNavigator: true)
|
|
||||||
.push(
|
|
||||||
CupertinoPageRoute(
|
|
||||||
fullscreenDialog: true,
|
|
||||||
builder: (context) => RoundView(
|
|
||||||
gameSession: widget.gameSession,
|
|
||||||
roundNumber: index + 1),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
child: SafeArea(
|
||||||
);
|
child: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.fromLTRB(10, 10, 0, 0),
|
||||||
|
child: Text(
|
||||||
|
'Spieler:innen',
|
||||||
|
style: CustomTheme.rowTitle,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
ListView.builder(
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
itemCount: widget.gameSession.players.length,
|
||||||
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
int playerIndex = sortedPlayerIndices[index];
|
||||||
|
return CupertinoListTile(
|
||||||
|
title: Row(
|
||||||
|
children: [
|
||||||
|
_getPlacementPrefix(index),
|
||||||
|
const SizedBox(width: 5),
|
||||||
|
Text(
|
||||||
|
widget.gameSession.players[playerIndex],
|
||||||
|
style: const TextStyle(
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
trailing: Row(
|
||||||
|
children: [
|
||||||
|
const SizedBox(width: 5),
|
||||||
|
Text(
|
||||||
|
'${widget.gameSession.playerScores[playerIndex]} '
|
||||||
|
'Punkte')
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.fromLTRB(10, 10, 0, 0),
|
||||||
|
child: Text(
|
||||||
|
'Runden',
|
||||||
|
style: CustomTheme.rowTitle,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
ListView.builder(
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
itemCount: widget.gameSession.roundNumber,
|
||||||
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.all(1),
|
||||||
|
child: CupertinoListTile(
|
||||||
|
title: Text(
|
||||||
|
'Runde ${index + 1}',
|
||||||
|
),
|
||||||
|
trailing: index + 1 !=
|
||||||
|
widget.gameSession.roundNumber ||
|
||||||
|
widget.gameSession.isGameFinished ==
|
||||||
|
true
|
||||||
|
? (const Text('\u{2705}',
|
||||||
|
style: TextStyle(fontSize: 22)))
|
||||||
|
: const Text('\u{23F3}',
|
||||||
|
style: TextStyle(fontSize: 22)),
|
||||||
|
onTap: () async {
|
||||||
|
// ignore: unused_local_variable
|
||||||
|
final val = await Navigator.of(context,
|
||||||
|
rootNavigator: true)
|
||||||
|
.push(
|
||||||
|
CupertinoPageRoute(
|
||||||
|
fullscreenDialog: true,
|
||||||
|
builder: (context) => RoundView(
|
||||||
|
gameSession: widget.gameSession,
|
||||||
|
roundNumber: index + 1),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
));
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user