added some minor changes
parent
f4939c62d7
commit
ed5a964376
|
@ -1,11 +1,29 @@
|
||||||
include ':app'
|
pluginManagement {
|
||||||
|
def flutterSdkPath = {
|
||||||
|
def properties = new Properties()
|
||||||
|
file("local.properties").withInputStream { properties.load(it) }
|
||||||
|
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||||
|
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
||||||
|
return flutterSdkPath
|
||||||
|
}
|
||||||
|
settings.ext.flutterSdkPath = flutterSdkPath()
|
||||||
|
|
||||||
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
|
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
|
||||||
def properties = new Properties()
|
|
||||||
|
|
||||||
assert localPropertiesFile.exists()
|
repositories {
|
||||||
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
|
||||||
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
plugins {
|
||||||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
|
||||||
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||||
|
id "com.android.application" version "7.3.0" apply false
|
||||||
|
}
|
||||||
|
|
||||||
|
include ":app"
|
||||||
|
|
|
@ -15,7 +15,7 @@ class MyApp extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
theme: halloweenTheme,
|
theme: halloweenTheme,
|
||||||
home: PlayerRegistry(),
|
home: const PlayerRegistry(),
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ class _FlipingCardState extends State<FlipingCard> {
|
||||||
front: Container(
|
front: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color: Theme.of(context).colorScheme.primary,
|
||||||
borderRadius: BorderRadius.all(Radius.circular(8.0)),
|
borderRadius: const BorderRadius.all(Radius.circular(8.0)),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
@ -55,7 +55,7 @@ class _FlipingCardState extends State<FlipingCard> {
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
const Text(
|
||||||
'Klick um deine Rolle zu sehen!',
|
'Klick um deine Rolle zu sehen!',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
|
@ -107,7 +107,7 @@ class _FlipingCardState extends State<FlipingCard> {
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(child: _renderContent(context)),
|
Expanded(child: _renderContent(context)),
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.only(bottom: 15),
|
padding: const EdgeInsets.only(bottom: 15),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
|
|
@ -9,6 +9,7 @@ class PlayerGridView extends StatefulWidget {
|
||||||
const PlayerGridView({required this.players, Key? key}) : super(key: key);
|
const PlayerGridView({required this.players, Key? key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
// ignore: library_private_types_in_public_api
|
||||||
_PlayerGridViewState createState() => _PlayerGridViewState();
|
_PlayerGridViewState createState() => _PlayerGridViewState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +33,7 @@ class _PlayerGridViewState extends State<PlayerGridView> {
|
||||||
size: 24,
|
size: 24,
|
||||||
color: isNight ? Colors.grey[300] : Colors.yellow,
|
color: isNight ? Colors.grey[300] : Colors.yellow,
|
||||||
),
|
),
|
||||||
SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
Text(
|
Text(
|
||||||
isNight ? 'Nacht' : 'Tag',
|
isNight ? 'Nacht' : 'Tag',
|
||||||
),
|
),
|
||||||
|
@ -41,7 +42,7 @@ class _PlayerGridViewState extends State<PlayerGridView> {
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(Icons.info),
|
icon: const Icon(Icons.info),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_showRolesDialog();
|
_showRolesDialog();
|
||||||
},
|
},
|
||||||
|
@ -89,13 +90,13 @@ class _PlayerGridViewState extends State<PlayerGridView> {
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
widget.players[index].name,
|
widget.players[index].name,
|
||||||
style: TextStyle(fontSize: 24),
|
style: const TextStyle(fontSize: 24),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
maxLines: 3,
|
maxLines: 3,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
if (widget.players[index].isDead)
|
if (widget.players[index].isDead)
|
||||||
Icon(Icons.close, color: Colors.red, size: 48),
|
const Icon(Icons.close, color: Colors.red, size: 48),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -103,12 +104,12 @@ class _PlayerGridViewState extends State<PlayerGridView> {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Divider(
|
const Divider(
|
||||||
height: 1,
|
height: 1,
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(bottom: 15, top: 15),
|
padding: const EdgeInsets.only(bottom: 15, top: 15),
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: _changePhase,
|
onPressed: _changePhase,
|
||||||
child: Text(isNight ? 'Tag skippen' : 'Nacht skippen'),
|
child: Text(isNight ? 'Tag skippen' : 'Nacht skippen'),
|
||||||
|
@ -167,11 +168,11 @@ class _PlayerGridViewState extends State<PlayerGridView> {
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: Text('Spielende'),
|
title: const Text('Spielende'),
|
||||||
content: Text(message),
|
content: Text(message),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
TextButton(
|
TextButton(
|
||||||
child: Text('Spiel beenden'),
|
child: const Text('Spiel beenden'),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.popUntil(context, ModalRoute.withName('/'));
|
Navigator.popUntil(context, ModalRoute.withName('/'));
|
||||||
},
|
},
|
||||||
|
@ -187,8 +188,8 @@ class _PlayerGridViewState extends State<PlayerGridView> {
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: Text('Spielerrollen'),
|
title: const Text('Spielerrollen'),
|
||||||
content: Container(
|
content: SizedBox(
|
||||||
width: double.maxFinite,
|
width: double.maxFinite,
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
|
@ -212,7 +213,7 @@ class _PlayerGridViewState extends State<PlayerGridView> {
|
||||||
),
|
),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
TextButton(
|
TextButton(
|
||||||
child: Text('OK'),
|
child: const Text('OK'),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,6 +5,7 @@ class PlayerRegistry extends StatefulWidget {
|
||||||
const PlayerRegistry({super.key});
|
const PlayerRegistry({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
// ignore: library_private_types_in_public_api
|
||||||
_PlayerRegistryState createState() => _PlayerRegistryState();
|
_PlayerRegistryState createState() => _PlayerRegistryState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +104,7 @@ class _PlayerRegistryState extends State<PlayerRegistry> {
|
||||||
},
|
},
|
||||||
child: const Text('Spiel einstellen'),
|
child: const Text('Spiel einstellen'),
|
||||||
),
|
),
|
||||||
Padding(padding: EdgeInsets.all(30))
|
const Padding(padding: EdgeInsets.all(30))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -125,7 +125,7 @@ class _GameSettingsState extends State<GameSettings> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: const Text(
|
||||||
'Spiel starten!',
|
'Spiel starten!',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -3,10 +3,10 @@ import 'package:flutter/material.dart';
|
||||||
ThemeData halloweenTheme = ThemeData(
|
ThemeData halloweenTheme = ThemeData(
|
||||||
useMaterial3: true,
|
useMaterial3: true,
|
||||||
brightness: Brightness.dark,
|
brightness: Brightness.dark,
|
||||||
colorScheme: ColorScheme.dark(
|
colorScheme: const ColorScheme.dark(
|
||||||
surface: const Color(0xff2d2d2d), // Dark grey for a spooky base
|
surface: Color(0xff2d2d2d), // Dark grey for a spooky base
|
||||||
primary: const Color(0xffff7518), // Halloween orange
|
primary: Color(0xffff7518), // Halloween orange
|
||||||
secondary: const Color(0xff8b0000), // Deep red for a sinister touch
|
secondary: Color(0xff8b0000), // Deep red for a sinister touch
|
||||||
tertiary: Colors.black, // Black for an eerie contrast
|
tertiary: Colors.black, // Black for an eerie contrast
|
||||||
),
|
),
|
||||||
scaffoldBackgroundColor: const Color(0xff2d2d2d), // Match the surface color
|
scaffoldBackgroundColor: const Color(0xff2d2d2d), // Match the surface color
|
||||||
|
@ -23,26 +23,26 @@ ThemeData halloweenTheme = ThemeData(
|
||||||
iconTheme: const IconThemeData(
|
iconTheme: const IconThemeData(
|
||||||
color: Color(0xffff7518), // Halloween orange
|
color: Color(0xffff7518), // Halloween orange
|
||||||
),
|
),
|
||||||
chipTheme: ChipThemeData(
|
chipTheme: const ChipThemeData(
|
||||||
backgroundColor: const Color(0xff8b0000), // Deep red
|
backgroundColor: Color(0xff8b0000), // Deep red
|
||||||
selectedColor: const Color(0xffff7518), // Halloween orange
|
selectedColor: Color(0xffff7518), // Halloween orange
|
||||||
labelStyle: TextStyle(
|
labelStyle: TextStyle(
|
||||||
color: Colors.white, // Text color for better readability
|
color: Colors.white, // Text color for better readability
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
sliderTheme: SliderThemeData(
|
sliderTheme: const SliderThemeData(
|
||||||
activeTickMarkColor: const Color(0xffff7518), // Halloween orange
|
activeTickMarkColor: Color(0xffff7518), // Halloween orange
|
||||||
activeTrackColor: const Color(0xffff7518), // Halloween orange
|
activeTrackColor: Color(0xffff7518), // Halloween orange
|
||||||
thumbColor: const Color(0xffff7518), // Halloween orange
|
thumbColor: Color(0xffff7518), // Halloween orange
|
||||||
valueIndicatorTextStyle: TextStyle(
|
valueIndicatorTextStyle: TextStyle(
|
||||||
color: Colors.black, // Text color for the value indicator
|
color: Colors.black, // Text color for the value indicator
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
dividerTheme: DividerThemeData(
|
dividerTheme: const DividerThemeData(
|
||||||
color: Colors.white, // Halloween orange
|
color: Colors.white, // Halloween orange
|
||||||
thickness: 1.0, // Set the thickness of the divider
|
thickness: 1.0, // Set the thickness of the divider
|
||||||
),
|
),
|
||||||
textTheme: TextTheme(
|
textTheme: const TextTheme(
|
||||||
displayLarge: TextStyle(
|
displayLarge: TextStyle(
|
||||||
color: Colors.white, // Halloween orange
|
color: Colors.white, // Halloween orange
|
||||||
fontSize: 32.0,
|
fontSize: 32.0,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: werwolf
|
name: werwolf
|
||||||
description: A new Flutter project.
|
description: A fanmade werwolf game
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue