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