locs, comments, removed print
This commit is contained in:
@@ -137,6 +137,7 @@
|
|||||||
"stats": "Statistiken",
|
"stats": "Statistiken",
|
||||||
"successfully_added_player": "Spieler:in {playerName} erfolgreich hinzugefügt",
|
"successfully_added_player": "Spieler:in {playerName} erfolgreich hinzugefügt",
|
||||||
"team": "Team",
|
"team": "Team",
|
||||||
|
"team_match": "Teamspiel",
|
||||||
"teams": "Teams",
|
"teams": "Teams",
|
||||||
"there_are_no_games_matching_your_search": "Es gibt keine Spielvorlagen, die deiner Suche entspricht",
|
"there_are_no_games_matching_your_search": "Es gibt keine Spielvorlagen, die deiner Suche entspricht",
|
||||||
"there_is_no_group_matching_your_search": "Es gibt keine Gruppe, die deiner Suche entspricht",
|
"there_is_no_group_matching_your_search": "Es gibt keine Gruppe, die deiner Suche entspricht",
|
||||||
|
|||||||
@@ -146,6 +146,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"team": "Team",
|
"team": "Team",
|
||||||
|
"team_match": "Team Match",
|
||||||
"teams": "Teams",
|
"teams": "Teams",
|
||||||
"there_are_no_games_matching_your_search": "There are no games matching your search",
|
"there_are_no_games_matching_your_search": "There are no games matching your search",
|
||||||
"there_is_no_group_matching_your_search": "There is no group matching your search",
|
"there_is_no_group_matching_your_search": "There is no group matching your search",
|
||||||
|
|||||||
@@ -872,6 +872,12 @@ abstract class AppLocalizations {
|
|||||||
/// **'Team'**
|
/// **'Team'**
|
||||||
String get team;
|
String get team;
|
||||||
|
|
||||||
|
/// No description provided for @team_match.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Team Match'**
|
||||||
|
String get team_match;
|
||||||
|
|
||||||
/// No description provided for @teams.
|
/// No description provided for @teams.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
|
|||||||
@@ -419,6 +419,9 @@ class AppLocalizationsDe extends AppLocalizations {
|
|||||||
@override
|
@override
|
||||||
String get team => 'Team';
|
String get team => 'Team';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get team_match => 'Teamspiel';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get teams => 'Teams';
|
String get teams => 'Teams';
|
||||||
|
|
||||||
|
|||||||
@@ -419,6 +419,9 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
@override
|
@override
|
||||||
String get team => 'Team';
|
String get team => 'Team';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get team_match => 'Team Match';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get teams => 'Teams';
|
String get teams => 'Teams';
|
||||||
|
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ class _CreateMatchViewState extends State<CreateMatchView> {
|
|||||||
|
|
||||||
if (!isEditMode())
|
if (!isEditMode())
|
||||||
ChooseTile(
|
ChooseTile(
|
||||||
title: 'Team Match',
|
title: loc.team_match,
|
||||||
trailing: Switch.adaptive(
|
trailing: Switch.adaptive(
|
||||||
activeTrackColor: CustomTheme.primaryColor,
|
activeTrackColor: CustomTheme.primaryColor,
|
||||||
padding: const EdgeInsets.symmetric(vertical: -15),
|
padding: const EdgeInsets.symmetric(vertical: -15),
|
||||||
|
|||||||
@@ -27,11 +27,11 @@ class CreateTeamsView extends StatefulWidget {
|
|||||||
|
|
||||||
class _CreateTeamsViewState extends State<CreateTeamsView> {
|
class _CreateTeamsViewState extends State<CreateTeamsView> {
|
||||||
final Random random = Random();
|
final Random random = Random();
|
||||||
|
List<Player> get matchPlayers => widget.match.players;
|
||||||
|
|
||||||
late List<Team> teams;
|
late List<Team> teams;
|
||||||
late List<TextEditingController> nameController;
|
late List<TextEditingController> nameController;
|
||||||
|
|
||||||
final int initialTeamCount = 2;
|
final int initialTeamCount = 2;
|
||||||
List<Player> get matchPlayers => widget.match.players;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didChangeDependencies() {
|
void didChangeDependencies() {
|
||||||
@@ -101,9 +101,9 @@ class _CreateTeamsViewState extends State<CreateTeamsView> {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onDelete: teams.length >= 3
|
onDelete: teams.length <= 2
|
||||||
? () => _removeTeam(index)
|
? null
|
||||||
: null,
|
: () => _removeTeam(index),
|
||||||
onColorSelection: (color) {
|
onColorSelection: (color) {
|
||||||
setState(() {
|
setState(() {
|
||||||
teams[index] = teams[index].copyWith(color: color);
|
teams[index] = teams[index].copyWith(color: color);
|
||||||
@@ -113,9 +113,12 @@ class _CreateTeamsViewState extends State<CreateTeamsView> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
// Button row
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
|
// Redistribute
|
||||||
MainMenuButton(
|
MainMenuButton(
|
||||||
icon: Icons.cached,
|
icon: Icons.cached,
|
||||||
text: loc.redistribute,
|
text: loc.redistribute,
|
||||||
@@ -124,6 +127,8 @@ class _CreateTeamsViewState extends State<CreateTeamsView> {
|
|||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 15),
|
const SizedBox(width: 15),
|
||||||
|
|
||||||
|
// Add new team
|
||||||
MainMenuButton(
|
MainMenuButton(
|
||||||
icon: Icons.add,
|
icon: Icons.add,
|
||||||
onPressed: teams.length >= widget.match.players.length
|
onPressed: teams.length >= widget.match.players.length
|
||||||
@@ -131,6 +136,8 @@ class _CreateTeamsViewState extends State<CreateTeamsView> {
|
|||||||
: addTeam,
|
: addTeam,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 15),
|
const SizedBox(width: 15),
|
||||||
|
|
||||||
|
// Confirm teams and start match
|
||||||
MainMenuButton(
|
MainMenuButton(
|
||||||
icon: Icons.check,
|
icon: Icons.check,
|
||||||
onPressed: teams.every((team) => team.members.isNotEmpty)
|
onPressed: teams.every((team) => team.members.isNotEmpty)
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ class EditMembersView extends StatefulWidget {
|
|||||||
|
|
||||||
class _EditMembersViewState extends State<EditMembersView> {
|
class _EditMembersViewState extends State<EditMembersView> {
|
||||||
List<Player> selectedPlayers = [];
|
List<Player> selectedPlayers = [];
|
||||||
List<Player> matchPlayer = [];
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|||||||
@@ -142,7 +142,6 @@ class _MatchViewState extends State<MatchView> {
|
|||||||
|
|
||||||
/// Loads the matches from the database and sorts them by creation date.
|
/// Loads the matches from the database and sorts them by creation date.
|
||||||
void loadMatches() {
|
void loadMatches() {
|
||||||
print('Loading matches from database');
|
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
Future.wait([
|
Future.wait([
|
||||||
db.matchDao.getAllMatches(),
|
db.matchDao.getAllMatches(),
|
||||||
|
|||||||
Reference in New Issue
Block a user