feat(app): finalize ad gated flows and weather
- add AppLogger and replace scattered print logging\n- implement ad-gated recommendation flow with reminder handling and calendar link\n- complete Bluetooth share pipeline with ad gate and merge\n- integrate KMA weather API with caching and dart-define decoding\n- add NaverUrlProcessor refactor and restore restaurant repository tests
This commit is contained in:
@@ -290,7 +290,16 @@ class _ShareScreenState extends ConsumerState<ShareScreen> {
|
||||
}
|
||||
|
||||
Future<void> _generateShareCode() async {
|
||||
final hasPermission =
|
||||
await PermissionService.checkAndRequestBluetoothPermission();
|
||||
if (!hasPermission) {
|
||||
if (!mounted) return;
|
||||
_showErrorSnackBar('블루투스 권한을 허용해야 공유 코드를 생성할 수 있어요.');
|
||||
return;
|
||||
}
|
||||
|
||||
final adService = ref.read(adServiceProvider);
|
||||
if (!mounted) return;
|
||||
final adWatched = await adService.showInterstitialAd(context);
|
||||
if (!mounted) return;
|
||||
if (!adWatched) {
|
||||
@@ -301,12 +310,17 @@ class _ShareScreenState extends ConsumerState<ShareScreen> {
|
||||
final random = Random();
|
||||
final code = List.generate(6, (_) => random.nextInt(10)).join();
|
||||
|
||||
setState(() {
|
||||
_shareCode = code;
|
||||
});
|
||||
|
||||
await ref.read(bluetoothServiceProvider).startListening(code);
|
||||
_showSuccessSnackBar('공유 코드가 생성되었습니다.');
|
||||
try {
|
||||
await ref.read(bluetoothServiceProvider).startListening(code);
|
||||
if (!mounted) return;
|
||||
setState(() {
|
||||
_shareCode = code;
|
||||
});
|
||||
_showSuccessSnackBar('공유 코드가 생성되었습니다.');
|
||||
} catch (_) {
|
||||
if (!mounted) return;
|
||||
_showErrorSnackBar('코드를 생성하지 못했습니다. 잠시 후 다시 시도해 주세요.');
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _scanDevices() async {
|
||||
|
||||
Reference in New Issue
Block a user