style: dart format reflow (no behavior change)

This commit is contained in:
vjrj 2026-07-09 22:19:43 +02:00
parent cf5d302cc1
commit e3ec855630
17 changed files with 197 additions and 139 deletions

View file

@ -267,7 +267,10 @@ class InventoryCsvCodec {
);
}
CsvImportLot? _parseLot(List<String> row, String? Function(List<String>, String) cell) {
CsvImportLot? _parseLot(
List<String> row,
String? Function(List<String>, String) cell,
) {
final typeCell = cell(row, 'lot_type');
final year = cell(row, 'harvest_year');
final month = cell(row, 'harvest_month');
@ -452,7 +455,8 @@ class InventoryCsvCodec {
i++;
}
row.add(field.toString());
final trailingEmpty = rows.isNotEmpty && row.length == 1 && row.first.isEmpty;
final trailingEmpty =
rows.isNotEmpty && row.length == 1 && row.first.isEmpty;
if (!trailingEmpty) rows.add(row);
return rows;
}

View file

@ -51,11 +51,7 @@ class InventorySnapshot {
/// newer incoming version (LWW), and rows skipped (already present and at
/// least as recent, or not decodable).
class ImportSummary {
const ImportSummary({
this.inserted = 0,
this.updated = 0,
this.skipped = 0,
});
const ImportSummary({this.inserted = 0, this.updated = 0, this.skipped = 0});
final int inserted;
final int updated;

View file

@ -65,13 +65,11 @@ class SpeciesRepository {
if (existing != null) {
// Backfill bundled reference data added after the row was seeded.
if (existing.viabilityYears == null && seed.viabilityYears != null) {
await (_db.update(_db.species)
..where((s) => s.id.equals(existing.id)))
.write(
SpeciesCompanion(
viabilityYears: Value(seed.viabilityYears),
),
);
await (_db.update(
_db.species,
)..where((s) => s.id.equals(existing.id))).write(
SpeciesCompanion(viabilityYears: Value(seed.viabilityYears)),
);
}
continue;
}