toggleFavorite method
- String id
Implementation
Future<void> toggleFavorite(String id) async {
final result = await repository.toggleFavorite(id);
result.fold(
(error) => emit(state.copyWith(error: error)),
(_) => _refresh(), // Reload respecting filter
);
}