diff --git a/lib/core/custom_theme.dart b/lib/core/custom_theme.dart index a00340b..fa78cb6 100644 --- a/lib/core/custom_theme.dart +++ b/lib/core/custom_theme.dart @@ -13,6 +13,10 @@ class CustomTheme { static const Color graphColor4 = Color(0xFF9C27B0); static final Color graphColor5 = primaryColor; + // Colors for PointsView + static Color pointLossColor = primaryColor; + static const Color pointGainColor = Color(0xFFF44336); + static TextStyle modeTitle = TextStyle( color: primaryColor, fontSize: 20, diff --git a/lib/presentation/views/active_game_view.dart b/lib/presentation/views/active_game_view.dart index 7b88608..defe5fc 100644 --- a/lib/presentation/views/active_game_view.dart +++ b/lib/presentation/views/active_game_view.dart @@ -4,7 +4,7 @@ import 'package:cabo_counter/data/game_session.dart'; import 'package:cabo_counter/l10n/generated/app_localizations.dart'; import 'package:cabo_counter/presentation/views/create_game_view.dart'; import 'package:cabo_counter/presentation/views/graph_view.dart'; -import 'package:cabo_counter/presentation/views/point_overview_view.dart'; +import 'package:cabo_counter/presentation/views/points_view.dart'; import 'package:cabo_counter/presentation/views/round_view.dart'; import 'package:cabo_counter/services/local_storage_service.dart'; import 'package:flutter/cupertino.dart'; @@ -145,7 +145,7 @@ class _ActiveGameViewState extends State { onTap: () => Navigator.push( context, CupertinoPageRoute( - builder: (_) => PointOverviewView( + builder: (_) => PointsView( gameSession: gameSession, )))), ], diff --git a/lib/presentation/views/point_overview_view.dart b/lib/presentation/views/points_view.dart similarity index 93% rename from lib/presentation/views/point_overview_view.dart rename to lib/presentation/views/points_view.dart index 0abdaac..555d5bd 100644 --- a/lib/presentation/views/point_overview_view.dart +++ b/lib/presentation/views/points_view.dart @@ -4,16 +4,16 @@ import 'package:cabo_counter/l10n/generated/app_localizations.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -class PointOverviewView extends StatefulWidget { +class PointsView extends StatefulWidget { final GameSession gameSession; - const PointOverviewView({super.key, required this.gameSession}); + const PointsView({super.key, required this.gameSession}); @override - State createState() => _PointOverviewViewState(); + State createState() => _PointsViewState(); } -class _PointOverviewViewState extends State { +class _PointsViewState extends State { @override Widget build(BuildContext context) { return CupertinoPageScaffold( @@ -81,8 +81,8 @@ class _PointOverviewViewState extends State { horizontal: 6, vertical: 2), decoration: BoxDecoration( color: update <= 0 - ? CustomTheme.primaryColor - : CupertinoColors.destructiveRed, + ? CustomTheme.pointLossColor + : CustomTheme.pointGainColor, borderRadius: BorderRadius.circular(8), ), child: Text( diff --git a/pubspec.yaml b/pubspec.yaml index 63ab04c..7f8483c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: cabo_counter description: "Mobile app for the card game Cabo" publish_to: 'none' -version: 0.4.8+523 +version: 0.4.8+525 environment: sdk: ^3.5.4