Adjustments for different player sizes
This commit is contained in:
@@ -36,6 +36,26 @@ class _MainMenuViewState extends State<MainMenuView> {
|
|||||||
players: ['Tim', 'Max', 'Sophie', 'Lena'],
|
players: ['Tim', 'Max', 'Sophie', 'Lena'],
|
||||||
winner: 'Sophie',
|
winner: 'Sophie',
|
||||||
gameMode: 0),
|
gameMode: 0),
|
||||||
|
GameSession(
|
||||||
|
gameTitle: '2 Namen max length',
|
||||||
|
players: ['Heinrich', 'Johannes'],
|
||||||
|
winner: 'Sophie',
|
||||||
|
gameMode: 0),
|
||||||
|
GameSession(
|
||||||
|
gameTitle: '3 Namen max length',
|
||||||
|
players: ['Benjamin', 'Stefanie', 'Wolfgang'],
|
||||||
|
winner: 'Sophie',
|
||||||
|
gameMode: 0),
|
||||||
|
GameSession(
|
||||||
|
gameTitle: '4 Namen max length',
|
||||||
|
players: ['Leonhard', 'Mathilde', 'Bernhard', 'Gerlinde'],
|
||||||
|
winner: 'Sophie',
|
||||||
|
gameMode: 0),
|
||||||
|
GameSession(
|
||||||
|
gameTitle: '5 Namen max length',
|
||||||
|
players: ['Hartmuth', 'Elisabet', 'Rosalind', 'Theresia', 'Karoline'],
|
||||||
|
winner: 'Sophie',
|
||||||
|
gameMode: 0),
|
||||||
];
|
];
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|||||||
@@ -105,15 +105,18 @@ class _RoundViewState extends State<RoundView> {
|
|||||||
widget.gameSession.players.asMap().keys,
|
widget.gameSession.players.asMap().keys,
|
||||||
value: (index) => Padding(
|
value: (index) => Padding(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
horizontal:
|
horizontal: gameSession.players.length < 3
|
||||||
gameSession.players.length > 3 ? 11 : 15,
|
? 15
|
||||||
|
: (gameSession.players.length > 4 ? 2 : 11),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
widget.gameSession.players[index],
|
widget.gameSession.players[index],
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
maxLines: 1,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontSize:
|
fontSize:
|
||||||
gameSession.players.length > 3 ? 14 : 16),
|
gameSession.players.length > 3 ? 15 : 18),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -237,7 +240,7 @@ class _RoundViewState extends State<RoundView> {
|
|||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
Positioned(
|
Positioned(
|
||||||
bottom: MediaQuery.of(context).viewInsets.bottom,
|
bottom: 0,
|
||||||
left: 0,
|
left: 0,
|
||||||
right: 0,
|
right: 0,
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|||||||
Reference in New Issue
Block a user