feat: SMS 스캔 패키지를 flutter_sms_inbox로 변경 및 플랫폼별 최적화
- telephony 패키지를 flutter_sms_inbox로 교체 - 플랫폼별 SMS 스캔 로직 구현: * Web: mock data 사용 * Android: flutter_sms_inbox로 실제 SMS 스캔 * iOS: SMS 기능 비활성화 - iOS에서 SMS 스캔 버튼 숨김 처리 - PlatformHelper 유틸리티 추가로 웹 환경 오류 해결 - Android 네이티브 MethodChannel 코드 제거
This commit is contained in:
@@ -14,6 +14,7 @@ import '../widgets/floating_navigation_bar.dart';
|
||||
import '../widgets/glassmorphic_scaffold.dart';
|
||||
import '../widgets/home_content.dart';
|
||||
import '../l10n/app_localizations.dart';
|
||||
import '../utils/platform_helper.dart';
|
||||
|
||||
class MainScreen extends StatefulWidget {
|
||||
const MainScreen({super.key});
|
||||
@@ -69,7 +70,7 @@ class _MainScreenState extends State<MainScreen>
|
||||
onShow: () {},
|
||||
);
|
||||
|
||||
// 화면 목록 초기화
|
||||
// 화면 목록 초기화 (iOS에서는 SMS 스캔 제외)
|
||||
_screens = [
|
||||
HomeContent(
|
||||
fadeController: _fadeController,
|
||||
@@ -82,7 +83,7 @@ class _MainScreenState extends State<MainScreen>
|
||||
),
|
||||
const AnalysisScreen(),
|
||||
Container(), // 추가 버튼은 별도 처리
|
||||
const SmsScanScreen(),
|
||||
if (!PlatformHelper.isIOS) const SmsScanScreen(),
|
||||
const SettingsScreen(),
|
||||
];
|
||||
}
|
||||
@@ -233,7 +234,9 @@ class _MainScreenState extends State<MainScreen>
|
||||
|
||||
return GlassmorphicScaffold(
|
||||
body: IndexedStack(
|
||||
index: currentIndex == 3 ? 3 : currentIndex == 4 ? 4 : currentIndex,
|
||||
index: PlatformHelper.isIOS
|
||||
? (currentIndex == 3 ? 3 : currentIndex) // iOS: 설정화면은 인덱스 3
|
||||
: (currentIndex == 3 ? 3 : currentIndex == 4 ? 4 : currentIndex), // Android: 기존 로직
|
||||
children: _screens,
|
||||
),
|
||||
backgroundGradient: backgroundGradient,
|
||||
|
||||
Reference in New Issue
Block a user