From ca19067152c4da3dda84d8b5d908fd6fa4ed6911 Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Sat, 3 May 2025 16:09:04 +0200 Subject: [PATCH] Refactoring --- lib/utility/custom_theme.dart | 8 +------- lib/utility/globals.dart | 3 +++ lib/views/active_game_view.dart | 4 ++-- lib/views/create_game_view.dart | 4 ++-- lib/views/information_view.dart | 2 +- lib/views/settings_view.dart | 6 +++--- pubspec.yaml | 2 +- 7 files changed, 13 insertions(+), 16 deletions(-) diff --git a/lib/utility/custom_theme.dart b/lib/utility/custom_theme.dart index 225d452..77a2f5b 100644 --- a/lib/utility/custom_theme.dart +++ b/lib/utility/custom_theme.dart @@ -16,7 +16,7 @@ class CustomTheme { fontSize: 16, ); - static TextStyle createGameTitle = TextStyle( + static TextStyle rowTitle = TextStyle( fontSize: 20, color: primaryColor, fontWeight: FontWeight.bold, @@ -27,10 +27,4 @@ class CustomTheme { color: white, fontWeight: FontWeight.bold, ); - - static TextStyle roundPlayers = TextStyle( - fontSize: 20, - color: white, - fontWeight: FontWeight.bold, - ); } diff --git a/lib/utility/globals.dart b/lib/utility/globals.dart index 74417b4..89d8559 100644 --- a/lib/utility/globals.dart +++ b/lib/utility/globals.dart @@ -10,5 +10,8 @@ class Globals { } static int pointLimit = 100; + static int caboPenalty = 5; + + static String appDevPhase = 'Alpha'; } diff --git a/lib/views/active_game_view.dart b/lib/views/active_game_view.dart index 659f2a8..1baabe5 100644 --- a/lib/views/active_game_view.dart +++ b/lib/views/active_game_view.dart @@ -28,7 +28,7 @@ class _ActiveGameViewState extends State { padding: const EdgeInsets.fromLTRB(10, 10, 0, 0), child: Text( 'Spieler:innen', - style: CustomTheme.createGameTitle, + style: CustomTheme.rowTitle, ), ), ListView.builder( @@ -61,7 +61,7 @@ class _ActiveGameViewState extends State { padding: const EdgeInsets.fromLTRB(10, 10, 0, 0), child: Text( 'Runden', - style: CustomTheme.createGameTitle, + style: CustomTheme.rowTitle, ), ), ListView.builder( diff --git a/lib/views/create_game_view.dart b/lib/views/create_game_view.dart index 8070daf..9150a22 100644 --- a/lib/views/create_game_view.dart +++ b/lib/views/create_game_view.dart @@ -44,7 +44,7 @@ class _CreateGameState extends State { padding: const EdgeInsets.fromLTRB(10, 10, 0, 0), child: Text( 'Spiel', - style: CustomTheme.createGameTitle, + style: CustomTheme.rowTitle, ), ), Padding( @@ -98,7 +98,7 @@ class _CreateGameState extends State { padding: const EdgeInsets.fromLTRB(10, 10, 0, 0), child: Text( 'Spieler:innen', - style: CustomTheme.createGameTitle, + style: CustomTheme.rowTitle, ), ), Expanded( diff --git a/lib/views/information_view.dart b/lib/views/information_view.dart index d03412d..72b76d1 100644 --- a/lib/views/information_view.dart +++ b/lib/views/information_view.dart @@ -29,7 +29,7 @@ class InformationView extends StatelessWidget { ), Padding( padding: - const EdgeInsets.symmetric(horizontal: 20, vertical: 10), + const EdgeInsets.symmetric(horizontal: 20, vertical: 30), child: SizedBox( height: 200, child: Image.asset('assets/cabo-counter-logo_rounded.png'), diff --git a/lib/views/settings_view.dart b/lib/views/settings_view.dart index f1230d5..8f0dcf4 100644 --- a/lib/views/settings_view.dart +++ b/lib/views/settings_view.dart @@ -39,7 +39,7 @@ class _SettingsViewState extends State { padding: const EdgeInsets.fromLTRB(10, 10, 0, 0), child: Text( 'Punkte', - style: CustomTheme.createGameTitle, + style: CustomTheme.rowTitle, ), ), Padding( @@ -100,7 +100,7 @@ class _SettingsViewState extends State { padding: const EdgeInsets.fromLTRB(10, 10, 0, 0), child: Text( 'Spieldaten', - style: CustomTheme.createGameTitle, + style: CustomTheme.rowTitle, ), ), Padding( @@ -201,7 +201,7 @@ class _SettingsViewState extends State { builder: (context, snapshot) { if (snapshot.hasData) { return Text( - 'Alpha ${snapshot.data!.version} ' + '${Globals.appDevPhase} ${snapshot.data!.version} ' '(Build ${snapshot.data!.buildNumber})', textAlign: TextAlign.center, ); diff --git a/pubspec.yaml b/pubspec.yaml index 0ae0eb6..bcfd55a 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.1.6+128 +version: 0.1.6-alpha+135 environment: sdk: ^3.5.4