changed leading and made buttons flexible
parent
1a3e92483f
commit
93ebd4befe
|
@ -115,41 +115,45 @@ class _FlipingCardState extends State<FlipingCard> {
|
|||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
OutlinedButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
if (index > 0 && index <= widget.players.length) {
|
||||
index--;
|
||||
if (!_controller.state!.isFront) {
|
||||
_controller.toggleCardWithoutAnimation();
|
||||
Flexible(
|
||||
child: OutlinedButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
if (index > 0 && index <= widget.players.length) {
|
||||
index--;
|
||||
if (!_controller.state!.isFront) {
|
||||
_controller.toggleCardWithoutAnimation();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
child: const Text("Zurück"),
|
||||
});
|
||||
},
|
||||
child: const Text("Zurück"),
|
||||
),
|
||||
),
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
if (index >= 0 && index < widget.players.length - 1) {
|
||||
index++;
|
||||
if (!_controller.state!.isFront) {
|
||||
_controller.toggleCardWithoutAnimation();
|
||||
Flexible(
|
||||
child: ElevatedButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
if (index >= 0 && index < widget.players.length - 1) {
|
||||
index++;
|
||||
if (!_controller.state!.isFront) {
|
||||
_controller.toggleCardWithoutAnimation();
|
||||
}
|
||||
} else if (index == widget.players.length - 1) {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) =>
|
||||
PlayerGridView(players: widget.players),
|
||||
),
|
||||
);
|
||||
}
|
||||
} else if (index == widget.players.length - 1) {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) =>
|
||||
PlayerGridView(players: widget.players),
|
||||
),
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
child: Text(index != widget.players.length - 1
|
||||
? "Nächster Spieler"
|
||||
: "Spiel anfangen!"),
|
||||
});
|
||||
},
|
||||
child: Text(index != widget.players.length - 1
|
||||
? "Nächster Spieler"
|
||||
: "Spiel anfangen!"),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue