Theme changes
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import 'package:cabo_counter/utility/styles.dart';
|
import 'package:cabo_counter/utility/theme.dart' as theme;
|
||||||
import 'package:cabo_counter/views/main_menu_view.dart';
|
import 'package:cabo_counter/views/main_menu_view.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
@@ -13,12 +13,16 @@ class App extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return CupertinoApp(
|
return CupertinoApp(
|
||||||
theme: CupertinoThemeData(
|
theme: CupertinoThemeData(
|
||||||
primaryColor: Styles.primaryColor,
|
brightness: Brightness.dark,
|
||||||
textTheme: CupertinoTextThemeData(
|
primaryColor: theme.primaryColor,
|
||||||
primaryColor: Styles.primaryColor,
|
scaffoldBackgroundColor: theme.backgroundColor,
|
||||||
)),
|
textTheme: CupertinoTextThemeData(
|
||||||
home: MainMenuView(),
|
primaryColor: theme.primaryColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
|
title: 'CABO-Counter',
|
||||||
|
home: MainMenuView(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,33 @@ import 'package:flutter/cupertino.dart';
|
|||||||
|
|
||||||
Color white = CupertinoColors.white;
|
Color white = CupertinoColors.white;
|
||||||
Color primaryColor = CupertinoColors.systemGreen;
|
Color primaryColor = CupertinoColors.systemGreen;
|
||||||
Color backgroundColor = const Color(0xFF080808);
|
Color backgroundColor = const Color(0xFF101010);
|
||||||
Color backgroundTintColor = CupertinoColors.darkBackgroundGray;
|
Color backgroundTintColor = CupertinoColors.darkBackgroundGray;
|
||||||
|
|
||||||
|
TextStyle modeTitle = TextStyle(
|
||||||
|
color: primaryColor,
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
);
|
||||||
|
|
||||||
|
const TextStyle modeDescription = TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
);
|
||||||
|
|
||||||
|
TextStyle createGameTitle = TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
color: primaryColor,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
);
|
||||||
|
|
||||||
|
TextStyle roundTitle = TextStyle(
|
||||||
|
fontSize: 60,
|
||||||
|
color: CupertinoColors.white,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
);
|
||||||
|
|
||||||
|
TextStyle roundPlayers = TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
color: CupertinoColors.white,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import 'package:cabo_counter/data_classes/game_session.dart';
|
import 'package:cabo_counter/data_classes/game_session.dart';
|
||||||
import 'package:cabo_counter/utility/styles.dart';
|
import 'package:cabo_counter/utility/theme.dart' as theme;
|
||||||
import 'package:cabo_counter/views/round_view.dart';
|
import 'package:cabo_counter/views/round_view.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ class _ActiveGameViewState extends State<ActiveGameView> {
|
|||||||
padding: EdgeInsets.fromLTRB(10, 10, 0, 0),
|
padding: EdgeInsets.fromLTRB(10, 10, 0, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'Spieler:innen',
|
'Spieler:innen',
|
||||||
style: Styles.createGameTitle,
|
style: theme.createGameTitle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
ListView.builder(
|
ListView.builder(
|
||||||
@@ -63,7 +63,7 @@ class _ActiveGameViewState extends State<ActiveGameView> {
|
|||||||
padding: EdgeInsets.fromLTRB(10, 10, 0, 0),
|
padding: EdgeInsets.fromLTRB(10, 10, 0, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'Runden',
|
'Runden',
|
||||||
style: Styles.createGameTitle,
|
style: theme.createGameTitle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
ListView.builder(
|
ListView.builder(
|
||||||
|
|||||||
@@ -42,8 +42,9 @@ class _CreateGameState extends State<CreateGame> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.fromLTRB(10, 10, 0, 0),
|
padding: EdgeInsets.fromLTRB(10, 10, 10, 0),
|
||||||
child: CupertinoTextField(
|
child: CupertinoTextField(
|
||||||
|
decoration: BoxDecoration(),
|
||||||
maxLength: 8,
|
maxLength: 8,
|
||||||
prefix: Text('Name'),
|
prefix: Text('Name'),
|
||||||
textAlign: TextAlign.right,
|
textAlign: TextAlign.right,
|
||||||
@@ -53,8 +54,9 @@ class _CreateGameState extends State<CreateGame> {
|
|||||||
),
|
),
|
||||||
// Spielmodus-Auswahl mit Chevron
|
// Spielmodus-Auswahl mit Chevron
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.fromLTRB(10, 10, 0, 0),
|
padding: EdgeInsets.fromLTRB(10, 10, 10, 0),
|
||||||
child: CupertinoTextField(
|
child: CupertinoTextField(
|
||||||
|
decoration: BoxDecoration(),
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
prefix: Text('Modus'),
|
prefix: Text('Modus'),
|
||||||
suffix: Row(
|
suffix: Row(
|
||||||
@@ -148,16 +150,10 @@ class _CreateGameState extends State<CreateGame> {
|
|||||||
} else {
|
} else {
|
||||||
// Spieler-Einträge
|
// Spieler-Einträge
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
padding: const EdgeInsets.symmetric(
|
||||||
|
vertical: 8.0, horizontal: 5),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
|
||||||
child: CupertinoTextField(
|
|
||||||
controller: _playerNameTextControllers[index],
|
|
||||||
placeholder: 'Spieler:in ${index + 1}',
|
|
||||||
padding: const EdgeInsets.all(12),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
CupertinoButton(
|
CupertinoButton(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
child: Icon(
|
child: Icon(
|
||||||
@@ -172,6 +168,14 @@ class _CreateGameState extends State<CreateGame> {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
Expanded(
|
||||||
|
child: CupertinoTextField(
|
||||||
|
controller: _playerNameTextControllers[index],
|
||||||
|
placeholder: 'Spieler:in ${index + 1}',
|
||||||
|
padding: const EdgeInsets.all(12),
|
||||||
|
decoration: BoxDecoration(),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:cabo_counter/utility/styles.dart';
|
import 'package:cabo_counter/utility/styles.dart';
|
||||||
|
import 'package:cabo_counter/utility/theme.dart' as theme;
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
class ModeSelectionMenu extends StatelessWidget {
|
class ModeSelectionMenu extends StatelessWidget {
|
||||||
@@ -23,14 +24,14 @@ class ModeSelectionMenu extends StatelessWidget {
|
|||||||
maxLines: 3,
|
maxLines: 3,
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.pop(context, '101 Pkt.');
|
Navigator.pop(context, '101 Punkte');
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 16.0),
|
padding: const EdgeInsets.symmetric(vertical: 16.0),
|
||||||
child: CupertinoListTile(
|
child: CupertinoListTile(
|
||||||
title: Text('Unbegrenzt', style: Styles.modeTitle),
|
title: Text('Unbegrenzt', style: theme.modeTitle),
|
||||||
subtitle: const Text(
|
subtitle: const Text(
|
||||||
'Dem Spiel sind keine Grenzen gesetzt. Es wird so lange '
|
'Dem Spiel sind keine Grenzen gesetzt. Es wird so lange '
|
||||||
'gespielt, bis die Spieler keine Lust mehr haben.',
|
'gespielt, bis die Spieler keine Lust mehr haben.',
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import 'package:cabo_counter/data_classes/game_session.dart';
|
import 'package:cabo_counter/data_classes/game_session.dart';
|
||||||
import 'package:cabo_counter/utility/styles.dart';
|
|
||||||
import 'package:cabo_counter/utility/theme.dart' as theme;
|
import 'package:cabo_counter/utility/theme.dart' as theme;
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
@@ -46,7 +45,6 @@ class _RoundViewState extends State<RoundView> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return CupertinoPageScaffold(
|
return CupertinoPageScaffold(
|
||||||
backgroundColor: Styles.backgroundColor,
|
|
||||||
navigationBar: const CupertinoNavigationBar(
|
navigationBar: const CupertinoNavigationBar(
|
||||||
transitionBetweenRoutes: true,
|
transitionBetweenRoutes: true,
|
||||||
middle: Text('Ergebnisse'),
|
middle: Text('Ergebnisse'),
|
||||||
@@ -62,7 +60,7 @@ class _RoundViewState extends State<RoundView> {
|
|||||||
padding: const EdgeInsets.fromLTRB(0, 40, 0, 50),
|
padding: const EdgeInsets.fromLTRB(0, 40, 0, 50),
|
||||||
child: Text(
|
child: Text(
|
||||||
'Runde ${widget.roundNumber}',
|
'Runde ${widget.roundNumber}',
|
||||||
style: Styles.roundTitle,
|
style: theme.roundTitle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
|
|||||||
Reference in New Issue
Block a user