Centered the add player button and made it wider
This commit is contained in:
@@ -207,38 +207,52 @@ class _CreateGameViewState extends State<CreateGameView> {
|
|||||||
}),
|
}),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(8, 0, 8, 50),
|
padding: const EdgeInsets.fromLTRB(8, 0, 8, 50),
|
||||||
child: Center(
|
child: Stack(
|
||||||
child: SizedBox(
|
children: [
|
||||||
width: double.infinity,
|
Row(
|
||||||
child: CupertinoButton(
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
children: [
|
||||||
child: Row(
|
CupertinoButton(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
padding: EdgeInsets.zero,
|
||||||
children: [
|
onPressed: null,
|
||||||
Text(
|
child: Icon(
|
||||||
AppLocalizations.of(context).add_player,
|
CupertinoIcons.plus_circle_fill,
|
||||||
style: TextStyle(color: CustomTheme.primaryColor),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 8),
|
|
||||||
Icon(
|
|
||||||
CupertinoIcons.add_circled_solid,
|
|
||||||
color: CustomTheme.primaryColor,
|
color: CustomTheme.primaryColor,
|
||||||
size: 25,
|
size: 25,
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
onPressed: () {
|
|
||||||
if (_playerNameTextControllers.length < maxPlayers) {
|
|
||||||
setState(() {
|
|
||||||
_playerNameTextControllers
|
|
||||||
.add(TextEditingController());
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
_showFeedbackDialog(CreateStatus.maxPlayers);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
),
|
Center(
|
||||||
|
child: CupertinoButton(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
AppLocalizations.of(context).add_player,
|
||||||
|
style: TextStyle(
|
||||||
|
color: CustomTheme.primaryColor),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
if (_playerNameTextControllers.length < maxPlayers) {
|
||||||
|
setState(() {
|
||||||
|
_playerNameTextControllers
|
||||||
|
.add(TextEditingController());
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
_showFeedbackDialog(CreateStatus.maxPlayers);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
|
|||||||
Reference in New Issue
Block a user