fix: 분석화면 총지출 금액 불일치 및 다국어 지원 개선

- 월별지출현황과 총지출요약 카드의 7월 금액 불일치 수정
- 현재 월은 currentPrice 사용, 과거 월은 이벤트 기간 체크
- 월별 차트 라벨 다국어 지원 추가 (한/영/일/중)
- 홈/분석 화면 총지출 금액 통일을 위한 통화 변환 로직 모듈화
- ExchangeRateService에 convertBetweenCurrencies 메서드 추가
- CurrencyUtil 및 SubscriptionProvider 리팩토링

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
JiWoong Sul
2025-07-17 00:07:24 +09:00
parent 46883f7314
commit 91bc91383b
3 changed files with 121 additions and 97 deletions

View File

@@ -116,6 +116,34 @@ class ExchangeRateService {
}
}
/// 두 통화 간 변환을 수행합니다. (USD를 거쳐서 변환)
Future<double?> convertBetweenCurrencies(
double amount,
String fromCurrency,
String toCurrency
) async {
if (fromCurrency == toCurrency) {
return amount;
}
// fromCurrency → USD → toCurrency
double? usdAmount;
if (fromCurrency == 'USD') {
usdAmount = amount;
} else {
usdAmount = await convertTargetToUsd(amount, fromCurrency);
}
if (usdAmount == null) return null;
if (toCurrency == 'USD') {
return usdAmount;
} else {
return await convertUsdToTarget(usdAmount, toCurrency);
}
}
/// 현재 환율 정보를 포맷팅하여 텍스트로 반환합니다.
Future<String> getFormattedExchangeRateInfo() async {
final rate = await getUsdToKrwRate();