style: apply dart format across project
This commit is contained in:
@@ -33,7 +33,7 @@ class MainScreenSummaryCard extends StatelessWidget {
|
||||
final locale = context.watch<LocaleProvider>().locale.languageCode;
|
||||
final defaultCurrency = CurrencyUtil.getDefaultCurrency(locale);
|
||||
final currencySymbol = CurrencyUtil.getCurrencySymbol(defaultCurrency);
|
||||
|
||||
|
||||
final int totalSubscriptions = provider.subscriptions.length;
|
||||
final int activeEvents = provider.activeEventSubscriptions.length;
|
||||
|
||||
@@ -88,7 +88,8 @@ class MainScreenSummaryCard extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
AppLocalizations.of(context).monthlyTotalSubscriptionCost,
|
||||
AppLocalizations.of(context)
|
||||
.monthlyTotalSubscriptionCost,
|
||||
style: TextStyle(
|
||||
color: AppColors
|
||||
.darkNavy, // color.md 가이드: 밝은 배경 위 어두운 텍스트
|
||||
@@ -99,9 +100,12 @@ class MainScreenSummaryCard extends StatelessWidget {
|
||||
// 환율 정보 표시 (영어 사용자는 표시 안함)
|
||||
if (locale != 'en')
|
||||
FutureBuilder<String>(
|
||||
future: CurrencyUtil.getExchangeRateInfoForLocale(locale),
|
||||
future:
|
||||
CurrencyUtil.getExchangeRateInfoForLocale(
|
||||
locale),
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasData && snapshot.data!.isNotEmpty) {
|
||||
if (snapshot.hasData &&
|
||||
snapshot.data!.isNotEmpty) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 8,
|
||||
@@ -116,7 +120,9 @@ class MainScreenSummaryCard extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
AppLocalizations.of(context).exchangeRateDisplay.replaceAll('@', snapshot.data!),
|
||||
AppLocalizations.of(context)
|
||||
.exchangeRateDisplay
|
||||
.replaceAll('@', snapshot.data!),
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w500,
|
||||
@@ -133,7 +139,8 @@ class MainScreenSummaryCard extends StatelessWidget {
|
||||
const SizedBox(height: 8),
|
||||
// 월별 총 비용 표시 (언어별 기본 통화)
|
||||
FutureBuilder<double>(
|
||||
future: CurrencyUtil.calculateTotalMonthlyExpenseInDefaultCurrency(
|
||||
future: CurrencyUtil
|
||||
.calculateTotalMonthlyExpenseInDefaultCurrency(
|
||||
provider.subscriptions,
|
||||
locale,
|
||||
),
|
||||
@@ -142,17 +149,24 @@ class MainScreenSummaryCard extends StatelessWidget {
|
||||
return const CircularProgressIndicator();
|
||||
}
|
||||
final monthlyCost = snapshot.data!;
|
||||
final decimals = (defaultCurrency == 'KRW' || defaultCurrency == 'JPY') ? 0 : 2;
|
||||
|
||||
final decimals = (defaultCurrency == 'KRW' ||
|
||||
defaultCurrency == 'JPY')
|
||||
? 0
|
||||
: 2;
|
||||
|
||||
return Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.baseline,
|
||||
textBaseline: TextBaseline.alphabetic,
|
||||
children: [
|
||||
Text(
|
||||
NumberFormat.currency(
|
||||
locale: defaultCurrency == 'KRW' ? 'ko_KR' :
|
||||
defaultCurrency == 'JPY' ? 'ja_JP' :
|
||||
defaultCurrency == 'CNY' ? 'zh_CN' : 'en_US',
|
||||
locale: defaultCurrency == 'KRW'
|
||||
? 'ko_KR'
|
||||
: defaultCurrency == 'JPY'
|
||||
? 'ja_JP'
|
||||
: defaultCurrency == 'CNY'
|
||||
? 'zh_CN'
|
||||
: 'en_US',
|
||||
symbol: '',
|
||||
decimalDigits: decimals,
|
||||
).format(monthlyCost),
|
||||
@@ -179,7 +193,8 @@ class MainScreenSummaryCard extends StatelessWidget {
|
||||
const SizedBox(height: 16),
|
||||
// 연간 비용 및 총 구독 수 표시
|
||||
FutureBuilder<double>(
|
||||
future: CurrencyUtil.calculateTotalMonthlyExpenseInDefaultCurrency(
|
||||
future: CurrencyUtil
|
||||
.calculateTotalMonthlyExpenseInDefaultCurrency(
|
||||
provider.subscriptions,
|
||||
locale,
|
||||
),
|
||||
@@ -189,17 +204,25 @@ class MainScreenSummaryCard extends StatelessWidget {
|
||||
}
|
||||
final monthlyCost = snapshot.data!;
|
||||
final yearlyCost = monthlyCost * 12;
|
||||
final decimals = (defaultCurrency == 'KRW' || defaultCurrency == 'JPY') ? 0 : 2;
|
||||
|
||||
final decimals = (defaultCurrency == 'KRW' ||
|
||||
defaultCurrency == 'JPY')
|
||||
? 0
|
||||
: 2;
|
||||
|
||||
return Row(
|
||||
children: [
|
||||
_buildInfoBox(
|
||||
context,
|
||||
title: AppLocalizations.of(context).estimatedAnnualCost,
|
||||
title: AppLocalizations.of(context)
|
||||
.estimatedAnnualCost,
|
||||
value: '${NumberFormat.currency(
|
||||
locale: defaultCurrency == 'KRW' ? 'ko_KR' :
|
||||
defaultCurrency == 'JPY' ? 'ja_JP' :
|
||||
defaultCurrency == 'CNY' ? 'zh_CN' : 'en_US',
|
||||
locale: defaultCurrency == 'KRW'
|
||||
? 'ko_KR'
|
||||
: defaultCurrency == 'JPY'
|
||||
? 'ja_JP'
|
||||
: defaultCurrency == 'CNY'
|
||||
? 'zh_CN'
|
||||
: 'en_US',
|
||||
symbol: currencySymbol,
|
||||
decimalDigits: decimals,
|
||||
).format(yearlyCost)}',
|
||||
@@ -207,8 +230,10 @@ class MainScreenSummaryCard extends StatelessWidget {
|
||||
const SizedBox(width: 16),
|
||||
_buildInfoBox(
|
||||
context,
|
||||
title: AppLocalizations.of(context).totalSubscriptionServices,
|
||||
value: '$totalSubscriptions${AppLocalizations.of(context).servicesUnit}',
|
||||
title: AppLocalizations.of(context)
|
||||
.totalSubscriptionServices,
|
||||
value:
|
||||
'$totalSubscriptions${AppLocalizations.of(context).servicesUnit}',
|
||||
),
|
||||
],
|
||||
);
|
||||
@@ -255,7 +280,8 @@ class MainScreenSummaryCard extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
AppLocalizations.of(context).eventDiscountActive,
|
||||
AppLocalizations.of(context)
|
||||
.eventDiscountActive,
|
||||
style: TextStyle(
|
||||
color: AppColors
|
||||
.darkNavy, // color.md 가이드: 밝은 배경 위 어두운 텍스트
|
||||
@@ -266,7 +292,8 @@ class MainScreenSummaryCard extends StatelessWidget {
|
||||
const SizedBox(height: 2),
|
||||
// 이벤트 절약액 표시 (언어별 기본 통화)
|
||||
FutureBuilder<double>(
|
||||
future: CurrencyUtil.calculateTotalEventSavingsInDefaultCurrency(
|
||||
future: CurrencyUtil
|
||||
.calculateTotalEventSavingsInDefaultCurrency(
|
||||
provider.subscriptions,
|
||||
locale,
|
||||
),
|
||||
@@ -275,15 +302,24 @@ class MainScreenSummaryCard extends StatelessWidget {
|
||||
return const SizedBox();
|
||||
}
|
||||
final eventSavings = snapshot.data!;
|
||||
final decimals = (defaultCurrency == 'KRW' || defaultCurrency == 'JPY') ? 0 : 2;
|
||||
|
||||
final decimals =
|
||||
(defaultCurrency == 'KRW' ||
|
||||
defaultCurrency == 'JPY')
|
||||
? 0
|
||||
: 2;
|
||||
|
||||
return Row(
|
||||
children: [
|
||||
Text(
|
||||
NumberFormat.currency(
|
||||
locale: defaultCurrency == 'KRW' ? 'ko_KR' :
|
||||
defaultCurrency == 'JPY' ? 'ja_JP' :
|
||||
defaultCurrency == 'CNY' ? 'zh_CN' : 'en_US',
|
||||
locale: defaultCurrency == 'KRW'
|
||||
? 'ko_KR'
|
||||
: defaultCurrency == 'JPY'
|
||||
? 'ja_JP'
|
||||
: defaultCurrency ==
|
||||
'CNY'
|
||||
? 'zh_CN'
|
||||
: 'en_US',
|
||||
symbol: currencySymbol,
|
||||
decimalDigits: decimals,
|
||||
).format(eventSavings),
|
||||
|
||||
Reference in New Issue
Block a user