Merge branch 'development' into feature/120-bearbeiten-und-loeschen-von-matches
# Conflicts: # lib/presentation/views/main_menu/match_view/create_match/create_match_view.dart
This commit is contained in:
@@ -62,7 +62,7 @@ class _PlayerSelectionState extends State<PlayerSelection> {
|
||||
/// Skeleton data used while loading players.
|
||||
late final List<Player> skeletonData = List.filled(
|
||||
7,
|
||||
Player(name: 'Player 0'),
|
||||
Player(name: 'Player 0', description: ''),
|
||||
);
|
||||
|
||||
@override
|
||||
@@ -276,7 +276,7 @@ class _PlayerSelectionState extends State<PlayerSelection> {
|
||||
final loc = AppLocalizations.of(context);
|
||||
final playerName = _searchBarController.text.trim();
|
||||
|
||||
final createdPlayer = Player(name: playerName);
|
||||
final createdPlayer = Player(name: playerName, description: '');
|
||||
final success = await db.playerDao.addPlayer(player: createdPlayer);
|
||||
|
||||
if (!context.mounted) return;
|
||||
|
||||
@@ -91,7 +91,7 @@ class _MatchTileState extends State<MatchTile> {
|
||||
const SizedBox(width: 6),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'${group.name}${widget.match.players != null ? ' + ${widget.match.players?.length}' : ''}',
|
||||
'${group.name} + ${widget.match.players.length}',
|
||||
style: const TextStyle(fontSize: 14, color: Colors.grey),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
@@ -106,7 +106,7 @@ class _MatchTileState extends State<MatchTile> {
|
||||
const SizedBox(width: 6),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'${widget.match.players!.length} ${loc.players}',
|
||||
'${widget.match.players.length} ${loc.players}',
|
||||
style: const TextStyle(fontSize: 14, color: Colors.grey),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
@@ -241,12 +241,10 @@ class _MatchTileState extends State<MatchTile> {
|
||||
final playerIds = <String>{};
|
||||
|
||||
// Add players from game.players
|
||||
if (widget.match.players != null) {
|
||||
for (var player in widget.match.players!) {
|
||||
if (!playerIds.contains(player.id)) {
|
||||
allPlayers.add(player);
|
||||
playerIds.add(player.id);
|
||||
}
|
||||
for (var player in widget.match.players) {
|
||||
if (!playerIds.contains(player.id)) {
|
||||
allPlayers.add(player);
|
||||
playerIds.add(player.id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user