diff --git a/lib/presentation/providers/recommendation_provider.dart b/lib/presentation/providers/recommendation_provider.dart index 22c894e..ebeaf2a 100644 --- a/lib/presentation/providers/recommendation_provider.dart +++ b/lib/presentation/providers/recommendation_provider.dart @@ -166,8 +166,8 @@ class RecommendationNotifier extends StateNotifier> { required List selectedCategories, List excludedRestaurantIds = const [], }) async { - // 현재 위치 가져오기 - final location = await _ref.read(currentLocationProvider.future); + // 현재 위치 가져오기 (StreamProvider에서 최신 위치 사용) + final location = _ref.read(currentLocationWithFallbackProvider).valueOrNull; if (location == null) { throw Exception('위치 정보를 가져올 수 없습니다'); } @@ -382,8 +382,8 @@ class EnhancedRecommendationNotifier return; } - // 현재 위치 가져오기 - final location = await _ref.read(currentLocationProvider.future); + // 현재 위치 가져오기 (StreamProvider에서 최신 위치 사용) + final location = _ref.read(currentLocationWithFallbackProvider).valueOrNull; if (location == null) { state = state.copyWith(error: '위치 정보를 가져올 수 없습니다', isLoading: false); return;