style: apply dart format across project
This commit is contained in:
@@ -7,7 +7,7 @@ import 'app_theme.dart';
|
||||
class AdaptiveTheme {
|
||||
/// 라이트 테마
|
||||
static ThemeData get lightTheme => AppTheme.lightTheme;
|
||||
|
||||
|
||||
/// 다크 테마
|
||||
static ThemeData get darkTheme {
|
||||
return ThemeData(
|
||||
@@ -22,21 +22,19 @@ class AdaptiveTheme {
|
||||
background: const Color(0xFF121212),
|
||||
surface: const Color(0xFF1E1E1E),
|
||||
),
|
||||
|
||||
scaffoldBackgroundColor: const Color(0xFF121212),
|
||||
|
||||
cardTheme: CardThemeData(
|
||||
color: const Color(0xFF1E1E1E),
|
||||
elevation: 2,
|
||||
shadowColor: Colors.black.withValues(alpha: 0.3),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
side: BorderSide(color: Colors.white.withValues(alpha: 0.1), width: 0.5),
|
||||
side: BorderSide(
|
||||
color: Colors.white.withValues(alpha: 0.1), width: 0.5),
|
||||
),
|
||||
clipBehavior: Clip.antiAlias,
|
||||
margin: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
|
||||
),
|
||||
|
||||
appBarTheme: AppBarTheme(
|
||||
backgroundColor: const Color(0xFF1E1E1E),
|
||||
foregroundColor: Colors.white,
|
||||
@@ -53,7 +51,6 @@ class AdaptiveTheme {
|
||||
size: 24,
|
||||
),
|
||||
),
|
||||
|
||||
textTheme: TextTheme(
|
||||
headlineLarge: const TextStyle(
|
||||
color: Colors.white,
|
||||
@@ -119,22 +116,24 @@ class AdaptiveTheme {
|
||||
height: 1.5,
|
||||
),
|
||||
),
|
||||
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
filled: true,
|
||||
fillColor: const Color(0xFF2A2A2A),
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
contentPadding:
|
||||
const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: BorderSide.none,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: BorderSide(color: Colors.white.withValues(alpha: 0.1), width: 1),
|
||||
borderSide:
|
||||
BorderSide(color: Colors.white.withValues(alpha: 0.1), width: 1),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: const BorderSide(color: AppColors.primaryColor, width: 1.5),
|
||||
borderSide:
|
||||
const BorderSide(color: AppColors.primaryColor, width: 1.5),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
@@ -151,7 +150,6 @@ class AdaptiveTheme {
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
|
||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppColors.primaryColor,
|
||||
@@ -164,7 +162,6 @@ class AdaptiveTheme {
|
||||
elevation: 0,
|
||||
),
|
||||
),
|
||||
|
||||
dividerTheme: DividerThemeData(
|
||||
color: Colors.white.withValues(alpha: 0.1),
|
||||
thickness: 1,
|
||||
@@ -172,7 +169,7 @@ class AdaptiveTheme {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/// OLED 최적화 다크 테마
|
||||
static ThemeData get oledTheme {
|
||||
return darkTheme.copyWith(
|
||||
@@ -192,7 +189,7 @@ class AdaptiveTheme {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/// 고대비 테마
|
||||
static ThemeData get highContrastTheme {
|
||||
return ThemeData(
|
||||
@@ -206,7 +203,6 @@ class AdaptiveTheme {
|
||||
background: Colors.white,
|
||||
surface: Colors.white,
|
||||
),
|
||||
|
||||
textTheme: const TextTheme(
|
||||
headlineLarge: TextStyle(
|
||||
color: Colors.black,
|
||||
@@ -234,7 +230,6 @@ class AdaptiveTheme {
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
|
||||
cardTheme: CardThemeData(
|
||||
elevation: 0,
|
||||
shape: RoundedRectangleBorder(
|
||||
@@ -242,7 +237,6 @@ class AdaptiveTheme {
|
||||
side: const BorderSide(color: Colors.black, width: 2),
|
||||
),
|
||||
),
|
||||
|
||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Colors.black,
|
||||
@@ -255,31 +249,28 @@ class AdaptiveTheme {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/// 시스템 테마에 따른 상태바 스타일 적용
|
||||
static void applySystemUIOverlay(BuildContext context) {
|
||||
final brightness = Theme.of(context).brightness;
|
||||
final isOled = Theme.of(context).scaffoldBackgroundColor == Colors.black;
|
||||
|
||||
|
||||
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
|
||||
statusBarColor: Colors.transparent,
|
||||
statusBarIconBrightness: brightness == Brightness.dark
|
||||
? Brightness.light
|
||||
: Brightness.dark,
|
||||
statusBarBrightness: brightness == Brightness.dark
|
||||
? Brightness.light
|
||||
: Brightness.dark,
|
||||
systemNavigationBarColor: isOled
|
||||
? Colors.black
|
||||
: (brightness == Brightness.dark
|
||||
? const Color(0xFF121212)
|
||||
statusBarIconBrightness:
|
||||
brightness == Brightness.dark ? Brightness.light : Brightness.dark,
|
||||
statusBarBrightness:
|
||||
brightness == Brightness.dark ? Brightness.light : Brightness.dark,
|
||||
systemNavigationBarColor: isOled
|
||||
? Colors.black
|
||||
: (brightness == Brightness.dark
|
||||
? const Color(0xFF121212)
|
||||
: Colors.white),
|
||||
systemNavigationBarIconBrightness: brightness == Brightness.dark
|
||||
? Brightness.light
|
||||
: Brightness.dark,
|
||||
systemNavigationBarIconBrightness:
|
||||
brightness == Brightness.dark ? Brightness.light : Brightness.dark,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
/// 접근성 설정에 따른 테마 조정
|
||||
static ThemeData getAccessibleTheme(
|
||||
ThemeData baseTheme, {
|
||||
@@ -290,9 +281,9 @@ class AdaptiveTheme {
|
||||
if (highContrast) {
|
||||
return highContrastTheme;
|
||||
}
|
||||
|
||||
|
||||
ThemeData theme = baseTheme;
|
||||
|
||||
|
||||
if (largeText) {
|
||||
theme = theme.copyWith(
|
||||
textTheme: theme.textTheme.apply(
|
||||
@@ -300,7 +291,7 @@ class AdaptiveTheme {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if (reduceMotion) {
|
||||
theme = theme.copyWith(
|
||||
pageTransitionsTheme: const PageTransitionsTheme(
|
||||
@@ -311,7 +302,7 @@ class AdaptiveTheme {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return theme;
|
||||
}
|
||||
}
|
||||
@@ -331,7 +322,7 @@ class ThemeSettings {
|
||||
final bool largeText;
|
||||
final bool reduceMotion;
|
||||
final bool highContrast;
|
||||
|
||||
|
||||
const ThemeSettings({
|
||||
this.mode = AppThemeMode.system,
|
||||
this.useSystemColors = false,
|
||||
@@ -339,7 +330,7 @@ class ThemeSettings {
|
||||
this.reduceMotion = false,
|
||||
this.highContrast = false,
|
||||
});
|
||||
|
||||
|
||||
ThemeSettings copyWith({
|
||||
AppThemeMode? mode,
|
||||
bool? useSystemColors,
|
||||
@@ -355,15 +346,15 @@ class ThemeSettings {
|
||||
highContrast: highContrast ?? this.highContrast,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'mode': mode.name,
|
||||
'useSystemColors': useSystemColors,
|
||||
'largeText': largeText,
|
||||
'reduceMotion': reduceMotion,
|
||||
'highContrast': highContrast,
|
||||
};
|
||||
|
||||
'mode': mode.name,
|
||||
'useSystemColors': useSystemColors,
|
||||
'largeText': largeText,
|
||||
'reduceMotion': reduceMotion,
|
||||
'highContrast': highContrast,
|
||||
};
|
||||
|
||||
factory ThemeSettings.fromJson(Map<String, dynamic> json) {
|
||||
return ThemeSettings(
|
||||
mode: AppThemeMode.values.firstWhere(
|
||||
@@ -376,4 +367,4 @@ class ThemeSettings {
|
||||
highContrast: json['highContrast'] ?? false,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,14 +27,14 @@ class AppColors {
|
||||
// 보더 & 디바이더
|
||||
static const borderColor = Color(0xFFE2E8F0); // 슬레이트 200
|
||||
static const dividerColor = Color(0xFFE2E8F0); // 슬레이트 200
|
||||
|
||||
|
||||
// 그림자 (color.md 가이드)
|
||||
static const shadowBlack = Color(0x14000000); // rgba(0,0,0,0.08) - 8% opacity
|
||||
|
||||
// 그라데이션 컬러 - 다양한 효과를 위한 조합
|
||||
static const List<Color> blueGradient = [
|
||||
Color(0xFF2563EB), // 딥 블루
|
||||
Color(0xFF60A5FA) // 스카이 블루
|
||||
Color(0xFF60A5FA) // 스카이 블루
|
||||
];
|
||||
static const List<Color> tealGradient = [
|
||||
Color(0xFF14B8A6),
|
||||
@@ -59,52 +59,52 @@ class AppColors {
|
||||
static const glassCard = Color(0x33FFFFFF); // 반투명 흰색 (20% opacity)
|
||||
static const glassBorder = Color(0xFF2563EB); // 딥 블루 테두리
|
||||
static const glassOverlay = Color(0x0D000000); // 연한 검정 오버레이 (5% opacity)
|
||||
|
||||
|
||||
// 다크 모드용 Glassmorphism 색상
|
||||
static const glassSurfaceDark = Color(0x0F000000); // 매우 연한 검정 (6% opacity)
|
||||
static const glassBackgroundDark = Color(0x1A000000); // 연한 검정 (10% opacity)
|
||||
static const glassCardDark = Color(0x33000000); // 반투명 검정 (20% opacity)
|
||||
static const glassBorderDark = Color(0x4D000000); // 반투명 검정 테두리 (30% opacity)
|
||||
|
||||
|
||||
// 백드롭 블러 효과를 위한 그라디언트
|
||||
static const List<Color> glassGradient = [
|
||||
Color(0x33FFFFFF), // 20% white
|
||||
Color(0x1AFFFFFF), // 10% white
|
||||
];
|
||||
|
||||
|
||||
static const List<Color> glassGradientDark = [
|
||||
Color(0x1A000000), // 10% black
|
||||
Color(0x0F000000), // 6% black
|
||||
];
|
||||
|
||||
|
||||
// 메인 그라데이션
|
||||
static const List<Color> mainGradient = [
|
||||
Color(0xFF2563EB), // 딥 블루
|
||||
Color(0xFF60A5FA), // 스카이 블루
|
||||
Color(0xFFE0E7EF), // 라이트 그레이
|
||||
];
|
||||
|
||||
|
||||
static const List<Color> accentGradient = [
|
||||
Color(0xFF38BDF8), // 소프트 민트
|
||||
Color(0xFF60A5FA), // 스카이 블루
|
||||
];
|
||||
|
||||
|
||||
// 시간대별 배경 그라디언트
|
||||
static const List<Color> morningGradient = [
|
||||
Color(0xFFFED7AA), // 따뜻한 오렌지
|
||||
Color(0xFFFBBF24), // 부드러운 노랑
|
||||
];
|
||||
|
||||
|
||||
static const List<Color> dayGradient = [
|
||||
Color(0xFFDDEAFC), // 연한 하늘색
|
||||
Color(0xFFBFDBFE), // 맑은 파랑
|
||||
];
|
||||
|
||||
|
||||
static const List<Color> eveningGradient = [
|
||||
Color(0xFFFCA5A5), // 부드러운 핑크
|
||||
Color(0xFFC084FC), // 연한 보라
|
||||
];
|
||||
|
||||
|
||||
static const List<Color> nightGradient = [
|
||||
Color(0xFF4338CA), // 깊은 인디고
|
||||
Color(0xFF1E1B4B), // 다크 네이비
|
||||
|
||||
@@ -52,21 +52,21 @@ class AppTheme {
|
||||
textTheme: const TextTheme(
|
||||
// 헤드라인 - 페이지 제목
|
||||
headlineLarge: const TextStyle(
|
||||
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
||||
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
||||
fontSize: 32,
|
||||
fontWeight: FontWeight.w700,
|
||||
letterSpacing: -0.5,
|
||||
height: 1.2,
|
||||
),
|
||||
headlineMedium: const TextStyle(
|
||||
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
||||
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
||||
fontSize: 28,
|
||||
fontWeight: FontWeight.w700,
|
||||
letterSpacing: -0.5,
|
||||
height: 1.2,
|
||||
),
|
||||
headlineSmall: const TextStyle(
|
||||
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
||||
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.25,
|
||||
@@ -75,21 +75,21 @@ class AppTheme {
|
||||
|
||||
// 타이틀 - 카드, 섹션 제목
|
||||
titleLarge: const TextStyle(
|
||||
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
||||
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.2,
|
||||
height: 1.4,
|
||||
),
|
||||
titleMedium: TextStyle(
|
||||
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
||||
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.1,
|
||||
height: 1.4,
|
||||
),
|
||||
titleSmall: TextStyle(
|
||||
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
||||
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: 0,
|
||||
@@ -98,21 +98,21 @@ class AppTheme {
|
||||
|
||||
// 본문 텍스트
|
||||
bodyLarge: TextStyle(
|
||||
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
||||
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w400,
|
||||
letterSpacing: 0.1,
|
||||
height: 1.5,
|
||||
),
|
||||
bodyMedium: TextStyle(
|
||||
color: AppColors.navyGray, // color.md 가이드: 서브 텍스트
|
||||
color: AppColors.navyGray, // color.md 가이드: 서브 텍스트
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400,
|
||||
letterSpacing: 0.1,
|
||||
height: 1.5,
|
||||
),
|
||||
bodySmall: TextStyle(
|
||||
color: AppColors.navyGray, // color.md 가이드: 서브 텍스트
|
||||
color: AppColors.navyGray, // color.md 가이드: 서브 텍스트
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w400,
|
||||
letterSpacing: 0.2,
|
||||
@@ -121,21 +121,21 @@ class AppTheme {
|
||||
|
||||
// 라벨 텍스트
|
||||
labelLarge: TextStyle(
|
||||
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
||||
color: AppColors.darkNavy, // color.md 가이드: 메인 텍스트
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: 0.1,
|
||||
height: 1.4,
|
||||
),
|
||||
labelMedium: TextStyle(
|
||||
color: AppColors.navyGray, // color.md 가이드: 서브 텍스트
|
||||
color: AppColors.navyGray, // color.md 가이드: 서브 텍스트
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: 0.2,
|
||||
height: 1.4,
|
||||
),
|
||||
labelSmall: TextStyle(
|
||||
color: AppColors.navyGray, // color.md 가이드: 서브 텍스트
|
||||
color: AppColors.navyGray, // color.md 가이드: 서브 텍스트
|
||||
fontSize: 11,
|
||||
fontWeight: FontWeight.w500,
|
||||
letterSpacing: 0.2,
|
||||
|
||||
Reference in New Issue
Block a user