added some minor changes

main
Oeyuu 2024-06-07 20:08:07 +02:00
parent f4939c62d7
commit ed5a964376
8 changed files with 59 additions and 39 deletions

View File

@ -1,11 +1,29 @@
include ':app'
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
return flutterSdkPath
}
settings.ext.flutterSdkPath = flutterSdkPath()
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
plugins {
id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
}
}
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
}
include ":app"

View File

@ -15,7 +15,7 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
theme: halloweenTheme,
home: PlayerRegistry(),
home: const PlayerRegistry(),
debugShowCheckedModeBanner: false,
);
}

View File

@ -41,7 +41,7 @@ class _FlipingCardState extends State<FlipingCard> {
front: Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.primary,
borderRadius: BorderRadius.all(Radius.circular(8.0)),
borderRadius: const BorderRadius.all(Radius.circular(8.0)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
@ -55,7 +55,7 @@ class _FlipingCardState extends State<FlipingCard> {
textAlign: TextAlign.center,
),
),
Text(
const Text(
'Klick um deine Rolle zu sehen!',
textAlign: TextAlign.center,
),
@ -107,7 +107,7 @@ class _FlipingCardState extends State<FlipingCard> {
children: <Widget>[
Expanded(child: _renderContent(context)),
Container(
padding: EdgeInsets.only(bottom: 15),
padding: const EdgeInsets.only(bottom: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,

View File

@ -9,6 +9,7 @@ class PlayerGridView extends StatefulWidget {
const PlayerGridView({required this.players, Key? key}) : super(key: key);
@override
// ignore: library_private_types_in_public_api
_PlayerGridViewState createState() => _PlayerGridViewState();
}
@ -32,7 +33,7 @@ class _PlayerGridViewState extends State<PlayerGridView> {
size: 24,
color: isNight ? Colors.grey[300] : Colors.yellow,
),
SizedBox(width: 10),
const SizedBox(width: 10),
Text(
isNight ? 'Nacht' : 'Tag',
),
@ -41,7 +42,7 @@ class _PlayerGridViewState extends State<PlayerGridView> {
centerTitle: true,
actions: [
IconButton(
icon: Icon(Icons.info),
icon: const Icon(Icons.info),
onPressed: () {
_showRolesDialog();
},
@ -89,13 +90,13 @@ class _PlayerGridViewState extends State<PlayerGridView> {
children: [
Text(
widget.players[index].name,
style: TextStyle(fontSize: 24),
style: const TextStyle(fontSize: 24),
textAlign: TextAlign.center,
maxLines: 3,
overflow: TextOverflow.ellipsis,
),
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,
color: Colors.grey,
),
Padding(
padding: EdgeInsets.only(bottom: 15, top: 15),
padding: const EdgeInsets.only(bottom: 15, top: 15),
child: ElevatedButton(
onPressed: _changePhase,
child: Text(isNight ? 'Tag skippen' : 'Nacht skippen'),
@ -167,11 +168,11 @@ class _PlayerGridViewState extends State<PlayerGridView> {
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text('Spielende'),
title: const Text('Spielende'),
content: Text(message),
actions: <Widget>[
TextButton(
child: Text('Spiel beenden'),
child: const Text('Spiel beenden'),
onPressed: () {
Navigator.popUntil(context, ModalRoute.withName('/'));
},
@ -187,8 +188,8 @@ class _PlayerGridViewState extends State<PlayerGridView> {
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text('Spielerrollen'),
content: Container(
title: const Text('Spielerrollen'),
content: SizedBox(
width: double.maxFinite,
child: ListView.builder(
shrinkWrap: true,
@ -212,7 +213,7 @@ class _PlayerGridViewState extends State<PlayerGridView> {
),
actions: <Widget>[
TextButton(
child: Text('OK'),
child: const Text('OK'),
onPressed: () {
Navigator.of(context).pop();
},

View File

@ -5,6 +5,7 @@ class PlayerRegistry extends StatefulWidget {
const PlayerRegistry({super.key});
@override
// ignore: library_private_types_in_public_api
_PlayerRegistryState createState() => _PlayerRegistryState();
}
@ -103,7 +104,7 @@ class _PlayerRegistryState extends State<PlayerRegistry> {
},
child: const Text('Spiel einstellen'),
),
Padding(padding: EdgeInsets.all(30))
const Padding(padding: EdgeInsets.all(30))
],
),
),

View File

@ -125,7 +125,7 @@ class _GameSettingsState extends State<GameSettings> {
),
);
},
child: Text(
child: const Text(
'Spiel starten!',
),
),

View File

@ -3,10 +3,10 @@ import 'package:flutter/material.dart';
ThemeData halloweenTheme = ThemeData(
useMaterial3: true,
brightness: Brightness.dark,
colorScheme: ColorScheme.dark(
surface: const Color(0xff2d2d2d), // Dark grey for a spooky base
primary: const Color(0xffff7518), // Halloween orange
secondary: const Color(0xff8b0000), // Deep red for a sinister touch
colorScheme: const ColorScheme.dark(
surface: Color(0xff2d2d2d), // Dark grey for a spooky base
primary: Color(0xffff7518), // Halloween orange
secondary: Color(0xff8b0000), // Deep red for a sinister touch
tertiary: Colors.black, // Black for an eerie contrast
),
scaffoldBackgroundColor: const Color(0xff2d2d2d), // Match the surface color
@ -23,26 +23,26 @@ ThemeData halloweenTheme = ThemeData(
iconTheme: const IconThemeData(
color: Color(0xffff7518), // Halloween orange
),
chipTheme: ChipThemeData(
backgroundColor: const Color(0xff8b0000), // Deep red
selectedColor: const Color(0xffff7518), // Halloween orange
chipTheme: const ChipThemeData(
backgroundColor: Color(0xff8b0000), // Deep red
selectedColor: Color(0xffff7518), // Halloween orange
labelStyle: TextStyle(
color: Colors.white, // Text color for better readability
),
),
sliderTheme: SliderThemeData(
activeTickMarkColor: const Color(0xffff7518), // Halloween orange
activeTrackColor: const Color(0xffff7518), // Halloween orange
thumbColor: const Color(0xffff7518), // Halloween orange
sliderTheme: const SliderThemeData(
activeTickMarkColor: Color(0xffff7518), // Halloween orange
activeTrackColor: Color(0xffff7518), // Halloween orange
thumbColor: Color(0xffff7518), // Halloween orange
valueIndicatorTextStyle: TextStyle(
color: Colors.black, // Text color for the value indicator
),
),
dividerTheme: DividerThemeData(
dividerTheme: const DividerThemeData(
color: Colors.white, // Halloween orange
thickness: 1.0, // Set the thickness of the divider
),
textTheme: TextTheme(
textTheme: const TextTheme(
displayLarge: TextStyle(
color: Colors.white, // Halloween orange
fontSize: 32.0,

View File

@ -1,5 +1,5 @@
name: werwolf
description: A new Flutter project.
description: A fanmade werwolf game
publish_to: 'none'
version: 0.1.0