feat(ads): 네이티브 광고 적용 및 디버그 스위치 이동

This commit is contained in:
JiWoong Sul
2025-12-03 17:25:00 +09:00
parent 5cae033977
commit d733bf664b
19 changed files with 461 additions and 168 deletions

View File

@@ -13,7 +13,6 @@ import '../../providers/location_provider.dart';
import '../../providers/recommendation_provider.dart';
import '../../providers/restaurant_provider.dart';
import '../../providers/weather_provider.dart';
import '../../widgets/native_ad_placeholder.dart';
import 'widgets/recommendation_result_dialog.dart';
class RandomSelectionScreen extends ConsumerStatefulWidget {
@@ -133,51 +132,65 @@ class _RandomSelectionScreenState extends ConsumerState<RandomSelectionScreen> {
child: Consumer(
builder: (context, ref, child) {
final weatherAsync = ref.watch(weatherProvider);
const double sectionHeight = 112;
return weatherAsync.when(
data: (weather) => Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
_buildWeatherData('지금', weather.current, isDark),
Container(
width: 1,
height: 50,
color: isDark
? AppColors.darkDivider
: AppColors.lightDivider,
),
_buildWeatherData('1시간 후', weather.nextHour, isDark),
],
),
loading: () => const Center(
child: CircularProgressIndicator(
color: AppColors.lightPrimary,
data: (weather) => SizedBox(
height: sectionHeight,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
_buildWeatherData('지금', weather.current, isDark),
Container(
width: 1,
height: 50,
color: isDark
? AppColors.darkDivider
: AppColors.lightDivider,
),
_buildWeatherData(
'1시간 후',
weather.nextHour,
isDark,
),
],
),
),
error: (_, __) => Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
_buildWeatherInfo(
'지금',
Icons.wb_sunny,
'맑음',
20,
isDark,
loading: () => const SizedBox(
height: sectionHeight,
child: Center(
child: CircularProgressIndicator(
color: AppColors.lightPrimary,
),
Container(
width: 1,
height: 50,
color: isDark
? AppColors.darkDivider
: AppColors.lightDivider,
),
_buildWeatherInfo(
'1시간 후',
Icons.wb_sunny,
'맑음',
22,
isDark,
),
],
),
),
error: (_, __) => SizedBox(
height: sectionHeight,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
_buildWeatherInfo(
'지금',
Icons.wb_sunny,
'맑음',
20,
isDark,
),
Container(
width: 1,
height: 50,
color: isDark
? AppColors.darkDivider
: AppColors.lightDivider,
),
_buildWeatherInfo(
'1시간 후',
Icons.wb_sunny,
'맑음',
22,
isDark,
),
],
),
),
);
},
@@ -385,9 +398,9 @@ class _RandomSelectionScreenState extends ConsumerState<RandomSelectionScreen> {
),
const SizedBox(height: 16),
const NativeAdPlaceholder(
margin: EdgeInsets.symmetric(vertical: 8),
),
// const NativeAdPlaceholder(
// margin: EdgeInsets.symmetric(vertical: 8),
// ),
],
),
),