Renamed Theme to AppTheme
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
class Theme {
|
class AppTheme {
|
||||||
static Color white = CupertinoColors.white;
|
static Color white = CupertinoColors.white;
|
||||||
static Color primaryColor = CupertinoColors.systemGreen;
|
static Color primaryColor = CupertinoColors.systemGreen;
|
||||||
static Color backgroundColor = const Color(0xFF101010);
|
static Color backgroundColor = const Color(0xFF101010);
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import 'package:cabo_counter/data/game_session.dart';
|
import 'package:cabo_counter/data/game_session.dart';
|
||||||
import 'package:cabo_counter/utility/theme.dart';
|
import 'package:cabo_counter/utility/apptheme.dart';
|
||||||
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';
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ class _ActiveGameViewState extends State<ActiveGameView> {
|
|||||||
padding: const EdgeInsets.fromLTRB(10, 10, 0, 0),
|
padding: const EdgeInsets.fromLTRB(10, 10, 0, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'Spieler:innen',
|
'Spieler:innen',
|
||||||
style: Theme.createGameTitle,
|
style: AppTheme.createGameTitle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
ListView.builder(
|
ListView.builder(
|
||||||
@@ -61,7 +61,7 @@ class _ActiveGameViewState extends State<ActiveGameView> {
|
|||||||
padding: const EdgeInsets.fromLTRB(10, 10, 0, 0),
|
padding: const EdgeInsets.fromLTRB(10, 10, 0, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'Runden',
|
'Runden',
|
||||||
style: Theme.createGameTitle,
|
style: AppTheme.createGameTitle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
ListView.builder(
|
ListView.builder(
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import 'package:cabo_counter/data/game_session.dart';
|
import 'package:cabo_counter/data/game_session.dart';
|
||||||
import 'package:cabo_counter/utility/theme.dart';
|
import 'package:cabo_counter/utility/apptheme.dart';
|
||||||
|
import 'package:cabo_counter/utility/globals.dart';
|
||||||
|
import 'package:cabo_counter/utility/local_storage_service.dart';
|
||||||
import 'package:cabo_counter/views/active_game_view.dart';
|
import 'package:cabo_counter/views/active_game_view.dart';
|
||||||
import 'package:cabo_counter/views/mode_selection_view.dart';
|
import 'package:cabo_counter/views/mode_selection_view.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
@@ -42,7 +44,7 @@ class _CreateGameState extends State<CreateGame> {
|
|||||||
padding: const EdgeInsets.fromLTRB(10, 10, 0, 0),
|
padding: const EdgeInsets.fromLTRB(10, 10, 0, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'Spiel',
|
'Spiel',
|
||||||
style: Theme.createGameTitle,
|
style: AppTheme.createGameTitle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
@@ -96,7 +98,7 @@ class _CreateGameState extends State<CreateGame> {
|
|||||||
padding: const EdgeInsets.fromLTRB(10, 10, 0, 0),
|
padding: const EdgeInsets.fromLTRB(10, 10, 0, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'Spieler:innen',
|
'Spieler:innen',
|
||||||
style: Theme.createGameTitle,
|
style: AppTheme.createGameTitle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
@@ -285,6 +287,8 @@ class _CreateGameState extends State<CreateGame> {
|
|||||||
players: players,
|
players: players,
|
||||||
gameHasPointLimit: selectedMode!,
|
gameHasPointLimit: selectedMode!,
|
||||||
);
|
);
|
||||||
|
Globals.addGameSession(gameSession);
|
||||||
|
LocalStorageService.saveGameSessions();
|
||||||
Navigator.pushReplacement(
|
Navigator.pushReplacement(
|
||||||
context,
|
context,
|
||||||
CupertinoPageRoute(
|
CupertinoPageRoute(
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ class InformationView extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return CupertinoPageScaffold(
|
return CupertinoPageScaffold(
|
||||||
|
resizeToAvoidBottomInset: false,
|
||||||
navigationBar: const CupertinoNavigationBar(
|
navigationBar: const CupertinoNavigationBar(
|
||||||
middle: Text('Über'),
|
middle: Text('Über'),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import 'package:cabo_counter/utility/theme.dart';
|
import 'package:cabo_counter/utility/apptheme.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
class ModeSelectionMenu extends StatelessWidget {
|
class ModeSelectionMenu extends StatelessWidget {
|
||||||
@@ -15,10 +15,10 @@ class ModeSelectionMenu extends StatelessWidget {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(0, 16, 0, 0),
|
padding: const EdgeInsets.fromLTRB(0, 16, 0, 0),
|
||||||
child: CupertinoListTile(
|
child: CupertinoListTile(
|
||||||
title: Text('101 Punkte', style: Theme.modeTitle),
|
title: Text('101 Punkte', style: AppTheme.modeTitle),
|
||||||
subtitle: const Text(
|
subtitle: const Text(
|
||||||
'Es wird solange gespielt, bis einer Spieler mehr als 100 Punkte erreicht',
|
'Es wird solange gespielt, bis einer Spieler mehr als 100 Punkte erreicht',
|
||||||
style: Theme.modeDescription,
|
style: AppTheme.modeDescription,
|
||||||
maxLines: 3,
|
maxLines: 3,
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -29,11 +29,11 @@ class ModeSelectionMenu extends StatelessWidget {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 16.0),
|
padding: const EdgeInsets.symmetric(vertical: 16.0),
|
||||||
child: CupertinoListTile(
|
child: CupertinoListTile(
|
||||||
title: Text('Unbegrenzt', style: Theme.modeTitle),
|
title: Text('Unbegrenzt', style: AppTheme.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 Ihr keine Lust mehr habt.',
|
'gespielt, bis Ihr keine Lust mehr habt.',
|
||||||
style: Theme.modeDescription,
|
style: AppTheme.modeDescription,
|
||||||
maxLines: 3,
|
maxLines: 3,
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|||||||
Reference in New Issue
Block a user