Revert to 4bd2f97
This commit is contained in:
@@ -164,7 +164,7 @@ class _ChooseGameViewState extends State<ChooseGameView> {
|
||||
game.ruleset,
|
||||
context,
|
||||
),
|
||||
badgeColor: getColorFromGameColor(game.color),
|
||||
badgeColor: getColorFromAppColor(game.color),
|
||||
isHighlighted: selectedGameId == game.id,
|
||||
onTap: () async {
|
||||
setState(() {
|
||||
|
||||
@@ -49,10 +49,10 @@ class _CreateGameViewState extends State<CreateGameView> {
|
||||
late final AppDatabase db;
|
||||
|
||||
late List<(Ruleset, String)> _rulesets;
|
||||
late List<(GameColor, String)> _colors;
|
||||
late List<(AppColor, String)> _colors;
|
||||
|
||||
Ruleset? selectedRuleset = Ruleset.singleWinner;
|
||||
GameColor? selectedColor = GameColor.orange;
|
||||
AppColor? selectedColor = AppColor.orange;
|
||||
|
||||
/// Controller for the game name input field.
|
||||
final _gameNameController = TextEditingController();
|
||||
@@ -87,10 +87,10 @@ class _CreateGameViewState extends State<CreateGameView> {
|
||||
),
|
||||
);
|
||||
_colors = List.generate(
|
||||
GameColor.values.length,
|
||||
AppColor.values.length,
|
||||
(index) => (
|
||||
GameColor.values[index],
|
||||
translateGameColorToString(GameColor.values[index], context),
|
||||
AppColor.values[index],
|
||||
translateAppColorToString(AppColor.values[index], context),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -117,7 +117,6 @@ class _CreateGameViewState extends State<CreateGameView> {
|
||||
|
||||
return ScaffoldMessenger(
|
||||
child: Scaffold(
|
||||
backgroundColor: CustomTheme.backgroundColor,
|
||||
appBar: AppBar(
|
||||
title: Text(isEditing ? loc.edit_game : loc.create_game),
|
||||
actions: [
|
||||
@@ -468,7 +467,7 @@ class _CreateGameViewState extends State<CreateGameView> {
|
||||
height: 16,
|
||||
margin: const EdgeInsets.only(left: 12),
|
||||
decoration: BoxDecoration(
|
||||
color: getColorFromGameColor(
|
||||
color: getColorFromAppColor(
|
||||
_colors[index].$1,
|
||||
),
|
||||
shape: BoxShape.circle,
|
||||
@@ -502,13 +501,13 @@ class _CreateGameViewState extends State<CreateGameView> {
|
||||
width: 16,
|
||||
height: 16,
|
||||
decoration: BoxDecoration(
|
||||
color: getColorFromGameColor(selectedColor!),
|
||||
color: getColorFromAppColor(selectedColor!),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 5),
|
||||
child: Text(translateGameColorToString(selectedColor!, context)),
|
||||
child: Text(translateAppColorToString(selectedColor!, context)),
|
||||
),
|
||||
Transform.rotate(
|
||||
angle: pi / 2,
|
||||
|
||||
@@ -196,6 +196,7 @@ class _CreateMatchViewState extends State<CreateMatchView> {
|
||||
child: PlayerSelection(
|
||||
key: ValueKey(selectedGroup?.id ?? 'no_group'),
|
||||
initialSelectedPlayers: selectedPlayers,
|
||||
onPlayerCreated: () => widget.onMatchesUpdated?.call(),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
selectedPlayers = value;
|
||||
|
||||
Reference in New Issue
Block a user