MIF_E31222379_MOBILE/lib/globaldata/trash/trash_service.dart

17 lines
495 B
Dart

import 'package:rijig_mobile/globaldata/trash/trash_model.dart';
import 'package:rijig_mobile/globaldata/trash/trash_repository.dart';
class TrashCategoryService {
final TrashCategoryRepository _trashCategoryRepository;
TrashCategoryService(this._trashCategoryRepository);
Future<TrashCategoryResponse> getCategories() async {
try {
return await _trashCategoryRepository.fetchCategories();
} catch (e) {
throw Exception('Failed to load categories: $e');
}
}
}