Add version files and update imports for trip model; enhance error handling

This commit is contained in:
ImBenji
2026-03-27 21:17:56 +00:00
parent e41e14e252
commit 427bcadc77
89 changed files with 9455 additions and 395 deletions
+6 -3
View File
@@ -1,5 +1,6 @@
import "dart:typed_data";
import "../models/trip.dart";
import "package:flutter/foundation.dart";
import "../models/operations/trip.dart";
import "../models/brr_metadata.dart";
import "../exporters/brr_exporter.dart";
import "../exporters/arriva_brr_exporter.dart";
@@ -37,8 +38,10 @@ class BRRExportService {
try {
final bytes = await _exporter.export(trips, metadata);
return ExportResult.success(bytes);
} catch (e) {
} catch (e, stackTrace) {
debugPrint("[BRRExportService] exportBRR failed: $e");
debugPrintStack(stackTrace: stackTrace);
return ExportResult.error(["Export failed: $e"]);
}
}
}
}
+4 -1
View File
@@ -1,4 +1,5 @@
import "dart:convert";
import "package:flutter/foundation.dart";
import "package:hive_flutter/hive_flutter.dart";
import "../models/brr_state.dart";
@@ -21,7 +22,9 @@ class StorageService {
try {
return BRRState.fromJson(jsonDecode(jsonString) as Map<String, dynamic>);
} catch (e) {
} catch (e, stackTrace) {
debugPrint("[StorageService] loadState failed: $e");
debugPrintStack(stackTrace: stackTrace);
return null;
}
}