20 lines
553 B
Dart
20 lines
553 B
Dart
import 'csv_data_service.dart';
|
|
|
|
class DataSeedingService {
|
|
final CsvDataService _csvDataService = CsvDataService();
|
|
|
|
Future<void> seedInitialData() async {
|
|
// No need to seed data as it comes from CSV files
|
|
// Just ensure CSV data is loaded properly
|
|
await _csvDataService.getBeans();
|
|
await _csvDataService.getMachines();
|
|
await _csvDataService.getRecipes();
|
|
}
|
|
|
|
Future<void> clearAndReseedData() async {
|
|
// Clear cached data and reload from CSV
|
|
await _csvDataService.clearAllData();
|
|
await seedInitialData();
|
|
}
|
|
}
|