changed leading and made buttons flexible

main
Oeyuu 2024-06-07 20:49:32 +02:00
parent 1a3e92483f
commit 93ebd4befe
2 changed files with 36 additions and 39 deletions

View File

@ -115,7 +115,8 @@ class _FlipingCardState extends State<FlipingCard> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
OutlinedButton(
Flexible(
child: OutlinedButton(
onPressed: () {
setState(() {
if (index > 0 && index <= widget.players.length) {
@ -128,7 +129,9 @@ class _FlipingCardState extends State<FlipingCard> {
},
child: const Text("Zurück"),
),
ElevatedButton(
),
Flexible(
child: ElevatedButton(
onPressed: () {
setState(() {
if (index >= 0 && index < widget.players.length - 1) {
@ -151,6 +154,7 @@ class _FlipingCardState extends State<FlipingCard> {
? "Nächster Spieler"
: "Spiel anfangen!"),
),
),
],
),
),

View File

@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:werwolf/screens/flippingcards.dart';
import '../models/game.dart';
@ -31,12 +30,6 @@ class _GameSettingsState extends State<GameSettings> {
style: Theme.of(context).textTheme.titleLarge, // Apply text theme
),
centerTitle: true,
leading: IconButton(
icon: const Icon(FontAwesomeIcons.xmark),
onPressed: () {
Navigator.popUntil(context, ModalRoute.withName('/'));
},
),
),
body: Padding(
padding: const EdgeInsets.fromLTRB(30.0, 40.0, 30.0, 8.0),