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