feat: adopt material 3 theme and billing adjustments
This commit is contained in:
@@ -3,7 +3,8 @@ import 'package:flutter/services.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import '../providers/app_lock_provider.dart';
|
||||
import '../providers/navigation_provider.dart';
|
||||
import '../theme/app_colors.dart';
|
||||
// import '../theme/app_colors.dart';
|
||||
import '../theme/color_scheme_ext.dart';
|
||||
import '../routes/app_routes.dart';
|
||||
import 'analysis_screen.dart';
|
||||
import 'app_lock_screen.dart';
|
||||
@@ -11,7 +12,6 @@ import 'settings_screen.dart';
|
||||
import 'sms_scan_screen.dart';
|
||||
import '../utils/animation_controller_helper.dart';
|
||||
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';
|
||||
@@ -162,33 +162,34 @@ class _MainScreenState extends State<MainScreen>
|
||||
if (result == true) {
|
||||
// 상단에 스낵바 표시
|
||||
if (!context.mounted) return;
|
||||
final cs = Theme.of(context).colorScheme;
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Row(
|
||||
children: [
|
||||
const Icon(
|
||||
Icon(
|
||||
Icons.check_circle,
|
||||
color: AppColors.pureWhite,
|
||||
color: cs.onPrimary,
|
||||
size: 20,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Text(
|
||||
AppLocalizations.of(context).subscriptionAdded,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.pureWhite,
|
||||
color: cs.onPrimary,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
backgroundColor: AppColors.successColor,
|
||||
backgroundColor: cs.success,
|
||||
behavior: SnackBarBehavior.floating,
|
||||
margin: EdgeInsets.only(
|
||||
top: MediaQuery.of(context).padding.top + 8, // 더 상단으로
|
||||
top: MediaQuery.of(context).padding.top + 8,
|
||||
left: 16,
|
||||
right: 16,
|
||||
bottom: MediaQuery.of(context).size.height - 100, // 더 상단으로
|
||||
bottom: MediaQuery.of(context).size.height - 100,
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
@@ -223,8 +224,7 @@ class _MainScreenState extends State<MainScreen>
|
||||
Widget build(BuildContext context) {
|
||||
final navigationProvider = context.watch<NavigationProvider>();
|
||||
|
||||
// 메인 그라데이션 사용
|
||||
List<Color> backgroundGradient = AppColors.mainGradient;
|
||||
// 그라데이션 제거: 단색 배경 사용
|
||||
|
||||
// 현재 인덱스가 유효한지 확인
|
||||
int currentIndex = navigationProvider.currentIndex;
|
||||
@@ -232,25 +232,31 @@ class _MainScreenState extends State<MainScreen>
|
||||
currentIndex = 0; // 추가 버튼은 홈으로 표시
|
||||
}
|
||||
|
||||
return GlassmorphicScaffold(
|
||||
body: IndexedStack(
|
||||
index: PlatformHelper.isIOS
|
||||
? (currentIndex == 3 ? 3 : currentIndex) // iOS: 설정화면은 인덱스 3
|
||||
: (currentIndex == 3
|
||||
? 3
|
||||
: currentIndex == 4
|
||||
? 4
|
||||
: currentIndex), // Android: 기존 로직
|
||||
children: _screens,
|
||||
),
|
||||
backgroundGradient: backgroundGradient,
|
||||
useFloatingNavBar: true,
|
||||
floatingNavBarIndex: navigationProvider.currentIndex,
|
||||
onFloatingNavBarTapped: (index) {
|
||||
_handleNavigation(index, context);
|
||||
},
|
||||
enableParticles: false,
|
||||
enableWaveAnimation: false,
|
||||
return Stack(
|
||||
children: [
|
||||
Positioned.fill(
|
||||
child: Container(color: Theme.of(context).colorScheme.surface),
|
||||
),
|
||||
Scaffold(
|
||||
extendBody: true,
|
||||
extendBodyBehindAppBar: true,
|
||||
body: IndexedStack(
|
||||
index: PlatformHelper.isIOS
|
||||
? (currentIndex == 3 ? 3 : currentIndex) // iOS: 설정화면은 인덱스 3
|
||||
: (currentIndex == 3
|
||||
? 3
|
||||
: currentIndex == 4
|
||||
? 4
|
||||
: currentIndex), // Android: 기존 로직
|
||||
children: _screens,
|
||||
),
|
||||
),
|
||||
FloatingNavigationBar(
|
||||
selectedIndex: navigationProvider.currentIndex,
|
||||
isVisible: true,
|
||||
onItemTapped: (index) => _handleNavigation(index, context),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user