Refactoring

This commit is contained in:
2026-05-24 23:27:14 +02:00
parent 428f967010
commit bccd47e20e
10 changed files with 171 additions and 163 deletions

View File

@@ -18,10 +18,10 @@ class StatisticScopeDao extends DatabaseAccessor<AppDatabase>
final results = await query.get();
return results
.map(
(result) => StatisticScope.values.firstWhere(
(e) => e.name == result.scope,
(row) => StatisticScope.values.firstWhere(
(e) => e.name == row.scope,
orElse: () => throw Exception(
'Invalid scope value: ${result.scope} for statistic ID: $statisticId',
'Invalid scope value: ${row.scope} for statistic ID: $statisticId',
),
),
)