saveBatchState method
Implementation
Future<void> saveBatchState(
String batchId, Map<String, dynamic> state) async {
final filePath = getBatchStateFilePath(batchId);
final file = File(filePath);
try {
await file.writeAsString(json.encode(state));
} catch (e) {
print("⚠️ Could not save batch state: $e");
}
}