feat: adopt material 3 theme and billing adjustments
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../../theme/app_colors.dart';
|
||||
// import '../../../theme/app_colors.dart';
|
||||
|
||||
/// 통화 선택 위젯
|
||||
/// KRW(원화), USD(달러), JPY(엔화), CNY(위안화) 중 선택할 수 있습니다.
|
||||
class CurrencySelector extends StatelessWidget {
|
||||
final String currency;
|
||||
final ValueChanged<String> onChanged;
|
||||
final bool isGlassmorphism;
|
||||
final bool isGlassmorphism; // deprecated: ignored
|
||||
|
||||
const CurrencySelector({
|
||||
super.key,
|
||||
@@ -72,7 +72,7 @@ class _CurrencyOption extends StatelessWidget {
|
||||
final String? subtitle;
|
||||
final bool isSelected;
|
||||
final VoidCallback onTap;
|
||||
final bool isGlassmorphism;
|
||||
final bool isGlassmorphism; // deprecated: ignored
|
||||
|
||||
const _CurrencyOption({
|
||||
required this.label,
|
||||
@@ -96,7 +96,7 @@ class _CurrencyOption extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
color: _getBackgroundColor(theme),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: _getBorder(),
|
||||
border: _getBorder(theme),
|
||||
),
|
||||
child: Center(
|
||||
child: Column(
|
||||
@@ -107,7 +107,7 @@ class _CurrencyOption extends StatelessWidget {
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: _getTextColor(),
|
||||
color: _getTextColor(theme),
|
||||
),
|
||||
),
|
||||
if (subtitle != null) ...[
|
||||
@@ -117,7 +117,7 @@ class _CurrencyOption extends StatelessWidget {
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: _getTextColor().withValues(alpha: 0.8),
|
||||
color: _getTextColor(theme).withValues(alpha: 0.8),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -130,28 +130,20 @@ class _CurrencyOption extends StatelessWidget {
|
||||
}
|
||||
|
||||
Color _getBackgroundColor(ThemeData theme) {
|
||||
if (isSelected) {
|
||||
return isGlassmorphism ? theme.primaryColor : const Color(0xFF3B82F6);
|
||||
}
|
||||
return isGlassmorphism
|
||||
? AppColors.surfaceColorAlt
|
||||
: Colors.grey.withValues(alpha: 0.1);
|
||||
final scheme = theme.colorScheme;
|
||||
return isSelected ? scheme.primary : scheme.surface;
|
||||
}
|
||||
|
||||
Border? _getBorder() {
|
||||
if (isSelected || !isGlassmorphism) {
|
||||
return null;
|
||||
}
|
||||
Border? _getBorder(ThemeData theme) {
|
||||
if (isSelected) return null;
|
||||
return Border.all(
|
||||
color: AppColors.borderColor,
|
||||
width: 1.5,
|
||||
color: theme.colorScheme.outline.withValues(alpha: 0.6),
|
||||
width: 1,
|
||||
);
|
||||
}
|
||||
|
||||
Color _getTextColor() {
|
||||
if (isSelected) {
|
||||
return Colors.white;
|
||||
}
|
||||
return isGlassmorphism ? AppColors.navyGray : Colors.grey[600]!;
|
||||
Color _getTextColor(ThemeData theme) {
|
||||
final scheme = theme.colorScheme;
|
||||
return isSelected ? scheme.onPrimary : scheme.onSurface;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user