Merge pull request #151 from flixcoo/enhance/148-kamikaze-button-color

Kamikaze button color
This commit is contained in:
2025-07-31 23:04:03 +02:00
committed by GitHub
6 changed files with 19 additions and 14 deletions

View File

@@ -2,11 +2,13 @@ import 'package:flutter/cupertino.dart';
class CustomTheme { class CustomTheme {
static Color white = CupertinoColors.white; static Color white = CupertinoColors.white;
static Color red = CupertinoColors.destructiveRed;
static Color primaryColor = CupertinoColors.systemGreen; static Color primaryColor = CupertinoColors.systemGreen;
static Color backgroundColor = const Color(0xFF101010); static Color backgroundColor = const Color(0xFF101010);
static Color mainElementBackgroundColor = CupertinoColors.darkBackgroundGray; static Color mainElementBackgroundColor = CupertinoColors.darkBackgroundGray;
static Color playerTileColor = CupertinoColors.secondaryLabel; static Color playerTileColor = CupertinoColors.secondaryLabel;
static Color buttonBackgroundColor = const Color(0xFF202020); static Color buttonBackgroundColor = const Color(0xFF202020);
static Color kamikazeColor = CupertinoColors.systemYellow;
// Line Colors for GraphView // Line Colors for GraphView
static const Color graphColor1 = Color(0xFFF44336); static const Color graphColor1 = Color(0xFFF44336);

View File

@@ -311,11 +311,12 @@ class _ActiveGameViewState extends State<ActiveGameView> {
content: Text(AppLocalizations.of(context).end_game_message), content: Text(AppLocalizations.of(context).end_game_message),
actions: [ actions: [
CupertinoDialogAction( CupertinoDialogAction(
isDestructiveAction: true,
child: Text( child: Text(
AppLocalizations.of(context).end_game, AppLocalizations.of(context).end_game,
style: const TextStyle( style: const TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: CupertinoColors.destructiveRed), ),
), ),
onPressed: () { onPressed: () {
setState(() { setState(() {

View File

@@ -176,9 +176,9 @@ class _CreateGameViewState extends State<CreateGameView> {
children: [ children: [
CupertinoButton( CupertinoButton(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
child: const Icon( child: Icon(
CupertinoIcons.minus_circle_fill, CupertinoIcons.minus_circle_fill,
color: CupertinoColors.destructiveRed, color: CustomTheme.red,
size: 25, size: 25,
), ),
onPressed: () { onPressed: () {

View File

@@ -109,7 +109,7 @@ class _MainMenuViewState extends State<MainMenuView> {
return Dismissible( return Dismissible(
key: Key(session.id), key: Key(session.id),
background: Container( background: Container(
color: CupertinoColors.destructiveRed, color: CustomTheme.red,
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
padding: const EdgeInsets.only(right: 20.0), padding: const EdgeInsets.only(right: 20.0),
child: const Icon( child: const Icon(

View File

@@ -236,12 +236,10 @@ class _RoundViewState extends State<RoundView> {
_endOfRoundNavigation(context, true); _endOfRoundNavigation(context, true);
} }
}, },
child: Text( child: Text(AppLocalizations.of(context).kamikaze,
AppLocalizations.of(context).kamikaze, style: TextStyle(
style: const TextStyle( color: CustomTheme.kamikazeColor,
color: CupertinoColors.destructiveRed, )),
),
),
), ),
), ),
), ),
@@ -300,7 +298,8 @@ class _RoundViewState extends State<RoundView> {
return 0; // If it's the first round, the order should be the same as the players list. return 0; // If it's the first round, the order should be the same as the players list.
} }
final List<int> scores = widget.gameSession.roundList[widget.roundNumber - 2].scoreUpdates; final List<int> scores =
widget.gameSession.roundList[widget.roundNumber - 2].scoreUpdates;
final int winnerIndex = scores.indexOf(0); final int winnerIndex = scores.indexOf(0);
// Fallback if no player has 0 points, which should not happen in a valid game. // Fallback if no player has 0 points, which should not happen in a valid game.
@@ -348,7 +347,10 @@ class _RoundViewState extends State<RoundView> {
_kamikazePlayerIndex = index; _kamikazePlayerIndex = index;
Navigator.pop(context, true); Navigator.pop(context, true);
}, },
child: Text(name), child: Text(
name,
style: TextStyle(color: CustomTheme.kamikazeColor),
),
); );
}).toList(), }).toList(),
cancelButton: CupertinoActionSheetAction( cancelButton: CupertinoActionSheetAction(

View File

@@ -2,7 +2,7 @@ name: cabo_counter
description: "Mobile app for the card game Cabo" description: "Mobile app for the card game Cabo"
publish_to: 'none' publish_to: 'none'
version: 0.5.4+605 version: 0.5.5+606
environment: environment:
sdk: ^3.5.4 sdk: ^3.5.4