Removed unnecessary declared attributes
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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')),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user