- 설정 화면에 SMS 권한 카드 추가: 상태 표시(허용/미허용/영구 거부), 권한 요청/설정 이동 지원\n- 기존 알림 권한 카드 스타일과 일관성 유지 feat(permissions): 최초 실행 시 SMS 권한 온보딩 화면 추가 및 Splash에서 라우팅 (Android) - 권한 필요 이유/수집 범위 현지화 문구 추가\n- 거부/영구거부 케이스 처리 및 설정 이동 chore(codex): AGENTS.md/체크 스크립트/CI/프롬프트 템플릿 추가 - AGENTS.md, scripts/check.sh, scripts/fix.sh, .github/workflows/flutter_ci.yml, .claude/agents/codex.md, 문서 템플릿 추가 refactor(logging): 경로별 print 제거 후 경량 로거(Log) 도입 - SMS 스캐너/컨트롤러, URL 매처, 데이터 리포지토리, 내비게이션, 메모리/성능 유틸 등 핵심 경로 치환 feat(exchange): 환율 API URL을 --dart-define로 오버라이드 가능 + 폴백 로깅 강화 test: URL 매처/환율 스모크 테스트 추가 chore(android): RECEIVE_SMS 권한 제거 (READ_SMS만 유지) fix(lints): dart fix + 수동 정리로 경고 대폭 감소, 비동기 context(mounted) 보강 fix(deprecations):\n- flutter_local_notifications의 androidAllowWhileIdle → androidScheduleMode 전환\n- WillPopScope → PopScope 교체 i18n: SMS 권한 온보딩/설정 문구 현지화 키 추가
356 lines
11 KiB
Dart
356 lines
11 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'app_colors.dart';
|
|
|
|
class AppTheme {
|
|
static ThemeData lightTheme = ThemeData(
|
|
useMaterial3: true,
|
|
colorScheme: const ColorScheme.light(
|
|
primary: AppColors.primaryColor,
|
|
onPrimary: Colors.white,
|
|
secondary: AppColors.secondaryColor,
|
|
tertiary: AppColors.infoColor,
|
|
error: AppColors.dangerColor,
|
|
surface: AppColors.surfaceColor,
|
|
),
|
|
|
|
// 기본 배경색
|
|
scaffoldBackgroundColor: AppColors.backgroundColor,
|
|
|
|
// 카드 스타일 - 글래스모피즘 효과
|
|
cardTheme: CardThemeData(
|
|
color: AppColors.glassCard,
|
|
elevation: 0,
|
|
shadowColor: AppColors.shadowBlack,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(16),
|
|
side: const BorderSide(color: AppColors.glassBorder, width: 1),
|
|
),
|
|
clipBehavior: Clip.antiAlias,
|
|
margin: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
|
|
),
|
|
|
|
// 앱바 스타일 - 글래스모피즘 디자인
|
|
appBarTheme: const AppBarTheme(
|
|
backgroundColor: Colors.transparent,
|
|
foregroundColor: AppColors.textPrimary,
|
|
elevation: 0,
|
|
centerTitle: false,
|
|
titleTextStyle: TextStyle(
|
|
color: AppColors.textPrimary,
|
|
fontSize: 22,
|
|
fontWeight: FontWeight.w600,
|
|
letterSpacing: -0.2,
|
|
),
|
|
iconTheme: IconThemeData(
|
|
color: AppColors.primaryColor,
|
|
size: 24,
|
|
),
|
|
),
|
|
|
|
// 타이포그래피 - Metronic Tailwind 스타일
|
|
textTheme: const TextTheme(
|
|
// 헤드라인 - 페이지 제목
|
|
headlineLarge: TextStyle(
|
|
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
|
fontSize: 32,
|
|
fontWeight: FontWeight.w700,
|
|
letterSpacing: -0.5,
|
|
height: 1.2,
|
|
),
|
|
headlineMedium: TextStyle(
|
|
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
|
fontSize: 28,
|
|
fontWeight: FontWeight.w700,
|
|
letterSpacing: -0.5,
|
|
height: 1.2,
|
|
),
|
|
headlineSmall: TextStyle(
|
|
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
|
fontSize: 24,
|
|
fontWeight: FontWeight.w600,
|
|
letterSpacing: -0.25,
|
|
height: 1.3,
|
|
),
|
|
|
|
// 타이틀 - 카드, 섹션 제목
|
|
titleLarge: TextStyle(
|
|
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
|
fontSize: 20,
|
|
fontWeight: FontWeight.w600,
|
|
letterSpacing: -0.2,
|
|
height: 1.4,
|
|
),
|
|
titleMedium: TextStyle(
|
|
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
|
fontSize: 18,
|
|
fontWeight: FontWeight.w600,
|
|
letterSpacing: -0.1,
|
|
height: 1.4,
|
|
),
|
|
titleSmall: TextStyle(
|
|
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w600,
|
|
letterSpacing: 0,
|
|
height: 1.4,
|
|
),
|
|
|
|
// 본문 텍스트
|
|
bodyLarge: TextStyle(
|
|
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w400,
|
|
letterSpacing: 0.1,
|
|
height: 1.5,
|
|
),
|
|
bodyMedium: TextStyle(
|
|
color: AppColors.navyGray, // color.md 가이드: 서브 텍스트
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w400,
|
|
letterSpacing: 0.1,
|
|
height: 1.5,
|
|
),
|
|
bodySmall: TextStyle(
|
|
color: AppColors.navyGray, // color.md 가이드: 서브 텍스트
|
|
fontSize: 12,
|
|
fontWeight: FontWeight.w400,
|
|
letterSpacing: 0.2,
|
|
height: 1.5,
|
|
),
|
|
|
|
// 라벨 텍스트
|
|
labelLarge: TextStyle(
|
|
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w600,
|
|
letterSpacing: 0.1,
|
|
height: 1.4,
|
|
),
|
|
labelMedium: TextStyle(
|
|
color: AppColors.navyGray, // color.md 가이드: 서브 텍스트
|
|
fontSize: 12,
|
|
fontWeight: FontWeight.w600,
|
|
letterSpacing: 0.2,
|
|
height: 1.4,
|
|
),
|
|
labelSmall: TextStyle(
|
|
color: AppColors.navyGray, // color.md 가이드: 서브 텍스트
|
|
fontSize: 11,
|
|
fontWeight: FontWeight.w500,
|
|
letterSpacing: 0.2,
|
|
height: 1.4,
|
|
),
|
|
),
|
|
|
|
// 입력 필드 스타일 - 글래스모피즘 디자인
|
|
inputDecorationTheme: InputDecorationTheme(
|
|
filled: true,
|
|
fillColor: AppColors.glassBackground,
|
|
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
|
border: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
borderSide: BorderSide.none,
|
|
),
|
|
enabledBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
borderSide: const BorderSide(color: AppColors.textSecondary, width: 1),
|
|
),
|
|
focusedBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
borderSide: const BorderSide(color: AppColors.primaryColor, width: 1.5),
|
|
),
|
|
errorBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
borderSide: const BorderSide(color: AppColors.dangerColor, width: 1),
|
|
),
|
|
focusedErrorBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
borderSide: const BorderSide(color: AppColors.dangerColor, width: 1.5),
|
|
),
|
|
labelStyle: const TextStyle(
|
|
color: AppColors.textSecondary,
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w500,
|
|
),
|
|
hintStyle: const TextStyle(
|
|
color: AppColors.textMuted,
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w400,
|
|
),
|
|
errorStyle: const TextStyle(
|
|
color: AppColors.dangerColor,
|
|
fontSize: 12,
|
|
fontWeight: FontWeight.w400,
|
|
),
|
|
),
|
|
|
|
// 버튼 스타일 - 프라이머리 버튼
|
|
elevatedButtonTheme: ElevatedButtonThemeData(
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: AppColors.primaryColor,
|
|
foregroundColor: Colors.white,
|
|
minimumSize: const Size(0, 48),
|
|
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 12),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
),
|
|
elevation: 0,
|
|
textStyle: const TextStyle(
|
|
fontSize: 15,
|
|
fontWeight: FontWeight.w600,
|
|
letterSpacing: 0.1,
|
|
),
|
|
),
|
|
),
|
|
|
|
// 텍스트 버튼 스타일
|
|
textButtonTheme: TextButtonThemeData(
|
|
style: TextButton.styleFrom(
|
|
foregroundColor: AppColors.primaryColor,
|
|
minimumSize: const Size(0, 40),
|
|
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(8),
|
|
),
|
|
textStyle: const TextStyle(
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w600,
|
|
letterSpacing: 0.1,
|
|
),
|
|
),
|
|
),
|
|
|
|
// 아웃라인 버튼 스타일
|
|
outlinedButtonTheme: OutlinedButtonThemeData(
|
|
style: OutlinedButton.styleFrom(
|
|
foregroundColor: AppColors.primaryColor,
|
|
minimumSize: const Size(0, 48),
|
|
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 12),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
),
|
|
side: const BorderSide(color: AppColors.secondaryColor, width: 1),
|
|
textStyle: const TextStyle(
|
|
fontSize: 15,
|
|
fontWeight: FontWeight.w600,
|
|
letterSpacing: 0.1,
|
|
),
|
|
),
|
|
),
|
|
|
|
// FAB 스타일
|
|
floatingActionButtonTheme: FloatingActionButtonThemeData(
|
|
backgroundColor: AppColors.primaryColor,
|
|
foregroundColor: Colors.white,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(16),
|
|
),
|
|
elevation: 2,
|
|
extendedPadding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
|
|
extendedTextStyle: const TextStyle(
|
|
fontSize: 15,
|
|
fontWeight: FontWeight.w600,
|
|
letterSpacing: 0.1,
|
|
),
|
|
),
|
|
|
|
// 스위치 스타일
|
|
switchTheme: SwitchThemeData(
|
|
thumbColor: WidgetStateProperty.resolveWith<Color>((states) {
|
|
if (states.contains(WidgetState.selected)) {
|
|
return AppColors.primaryColor;
|
|
}
|
|
return Colors.white;
|
|
}),
|
|
trackColor: WidgetStateProperty.resolveWith<Color>((states) {
|
|
if (states.contains(WidgetState.selected)) {
|
|
return AppColors.secondaryColor.withValues(alpha: 0.5);
|
|
}
|
|
return AppColors.borderColor;
|
|
}),
|
|
),
|
|
|
|
// 체크박스 스타일
|
|
checkboxTheme: CheckboxThemeData(
|
|
fillColor: WidgetStateProperty.resolveWith<Color>((states) {
|
|
if (states.contains(WidgetState.selected)) {
|
|
return AppColors.primaryColor;
|
|
}
|
|
return Colors.transparent;
|
|
}),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(4),
|
|
),
|
|
side: const BorderSide(color: AppColors.secondaryColor, width: 1.5),
|
|
),
|
|
|
|
// 라디오 버튼 스타일
|
|
radioTheme: RadioThemeData(
|
|
fillColor: WidgetStateProperty.resolveWith<Color>((states) {
|
|
if (states.contains(WidgetState.selected)) {
|
|
return AppColors.primaryColor;
|
|
}
|
|
return AppColors.textSecondary;
|
|
}),
|
|
),
|
|
|
|
// 슬라이더 스타일
|
|
sliderTheme: SliderThemeData(
|
|
activeTrackColor: AppColors.primaryColor,
|
|
inactiveTrackColor: AppColors.textSecondary,
|
|
thumbColor: AppColors.primaryColor,
|
|
overlayColor: AppColors.primaryColor.withValues(alpha: 0.3),
|
|
trackHeight: 4,
|
|
thumbShape: const RoundSliderThumbShape(enabledThumbRadius: 10),
|
|
overlayShape: const RoundSliderOverlayShape(overlayRadius: 20),
|
|
),
|
|
|
|
// 탭바 스타일
|
|
tabBarTheme: const TabBarThemeData(
|
|
labelColor: AppColors.primaryColor,
|
|
unselectedLabelColor: AppColors.textSecondary,
|
|
indicatorColor: AppColors.primaryColor,
|
|
labelStyle: TextStyle(
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w600,
|
|
letterSpacing: 0.1,
|
|
),
|
|
unselectedLabelStyle: TextStyle(
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w500,
|
|
letterSpacing: 0.1,
|
|
),
|
|
),
|
|
|
|
// 디바이더 스타일
|
|
dividerTheme: const DividerThemeData(
|
|
color: AppColors.dividerColor,
|
|
thickness: 1,
|
|
space: 16,
|
|
),
|
|
|
|
// 페이지 트랜지션
|
|
pageTransitionsTheme: const PageTransitionsTheme(
|
|
builders: {
|
|
TargetPlatform.android: ZoomPageTransitionsBuilder(),
|
|
TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
|
|
TargetPlatform.macOS: CupertinoPageTransitionsBuilder(),
|
|
},
|
|
),
|
|
|
|
// 스낵바 스타일
|
|
snackBarTheme: SnackBarThemeData(
|
|
backgroundColor: AppColors.textPrimary,
|
|
contentTextStyle: const TextStyle(
|
|
color: Colors.white,
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w500,
|
|
),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(8),
|
|
),
|
|
behavior: SnackBarBehavior.floating,
|
|
),
|
|
);
|
|
}
|