Revert to 4bd2f97
All checks were successful
Pull Request Pipeline / lint (pull_request) Successful in 45s
Pull Request Pipeline / localizations (pull_request) Successful in 29s
Pull Request Pipeline / test (pull_request) Successful in 1m31s

This commit is contained in:
2026-05-25 19:22:59 +02:00
parent 6679a0f942
commit eaf7822732
70 changed files with 6970 additions and 839 deletions

View File

@@ -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(() {

View File

@@ -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,

View File

@@ -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;