Removed unnecessary declared attributes

This commit is contained in:
2026-04-21 20:24:10 +02:00
parent 0bad0862a7
commit 2035e5b7d4
11 changed files with 46 additions and 58 deletions

View File

@@ -148,7 +148,7 @@ class _CreateGroupViewState extends State<CreateGroupView> {
final groupName = _groupNameController.text.trim();
final success = await db.groupDao.addGroup(
group: Group(name: groupName, description: '', members: selectedPlayers),
group: Group(name: groupName, members: selectedPlayers),
);
return success;

View File

@@ -36,7 +36,7 @@ class _GroupViewState extends State<GroupView> {
Group(
name: 'Skeleton Group',
description: '',
members: List.filled(6, Player(name: 'Skeleton Player', description: '')),
members: List.filled(6, Player(name: 'Skeleton Player')),
),
);

View File

@@ -167,8 +167,7 @@ class _StatisticsViewState extends State<StatisticsView> {
final playerId = winCounts[i].$1;
final player = players.firstWhere(
(p) => p.id == playerId,
orElse: () =>
Player(id: playerId, name: loc.not_available, description: ''),
orElse: () => Player(id: playerId, name: loc.not_available),
);
winCounts[i] = (player.name, winCounts[i].$2);
}
@@ -230,8 +229,7 @@ class _StatisticsViewState extends State<StatisticsView> {
final playerId = matchCounts[i].$1;
final player = players.firstWhere(
(p) => p.id == playerId,
orElse: () =>
Player(id: playerId, name: loc.not_available, description: ''),
orElse: () => Player(id: playerId, name: loc.not_available),
);
matchCounts[i] = (player.name, matchCounts[i].$2);
}

View File

@@ -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', description: ''),
Player(name: 'Player 0'),
);
@override
@@ -282,7 +282,7 @@ class _PlayerSelectionState extends State<PlayerSelection> {
final loc = AppLocalizations.of(context);
final playerName = _searchBarController.text.trim();
final createdPlayer = Player(name: playerName, description: '');
final createdPlayer = Player(name: playerName);
final success = await db.playerDao.addPlayer(player: createdPlayer);
if (!context.mounted) return;