feat: improve sms scan review and detail layouts
This commit is contained in:
@@ -41,7 +41,7 @@ class DetailHeaderSection extends StatelessWidget {
|
||||
);
|
||||
|
||||
return Container(
|
||||
height: 320,
|
||||
constraints: const BoxConstraints(minHeight: 320),
|
||||
decoration: BoxDecoration(color: baseColor),
|
||||
child: Stack(
|
||||
children: [
|
||||
@@ -78,6 +78,7 @@ class DetailHeaderSection extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(24),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// 뒤로가기 버튼
|
||||
@@ -100,7 +101,7 @@ class DetailHeaderSection extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
const SizedBox(height: 16),
|
||||
// 서비스 정보
|
||||
FadeTransition(
|
||||
opacity: fadeAnimation,
|
||||
@@ -200,42 +201,47 @@ class DetailHeaderSection extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
_InfoColumn(
|
||||
label: AppLocalizations.of(context)
|
||||
.nextBillingDate,
|
||||
value: AppLocalizations.of(context)
|
||||
.formatDate(
|
||||
controller.nextBillingDate),
|
||||
Expanded(
|
||||
child: _InfoColumn(
|
||||
label: AppLocalizations.of(context)
|
||||
.nextBillingDate,
|
||||
value: AppLocalizations.of(context)
|
||||
.formatDate(
|
||||
controller.nextBillingDate),
|
||||
),
|
||||
),
|
||||
FutureBuilder<String>(
|
||||
future: () async {
|
||||
final locale = context
|
||||
.read<LocaleProvider>()
|
||||
.locale
|
||||
.languageCode;
|
||||
final amount = double.tryParse(
|
||||
controller
|
||||
.monthlyCostController.text
|
||||
.replaceAll(',', '')) ??
|
||||
0;
|
||||
return CurrencyUtil
|
||||
.formatAmountWithLocale(
|
||||
amount,
|
||||
controller.currency,
|
||||
locale,
|
||||
);
|
||||
}(),
|
||||
builder: (context, snapshot) {
|
||||
return _InfoColumn(
|
||||
label: AppLocalizations.of(context)
|
||||
.monthlyExpense,
|
||||
value: snapshot.data ?? '-',
|
||||
alignment: CrossAxisAlignment.end,
|
||||
);
|
||||
},
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: FutureBuilder<String>(
|
||||
future: () async {
|
||||
final locale = context
|
||||
.read<LocaleProvider>()
|
||||
.locale
|
||||
.languageCode;
|
||||
final amount = double.tryParse(
|
||||
controller
|
||||
.monthlyCostController
|
||||
.text
|
||||
.replaceAll(',', '')) ??
|
||||
0;
|
||||
return CurrencyUtil
|
||||
.formatAmountWithLocale(
|
||||
amount,
|
||||
controller.currency,
|
||||
locale,
|
||||
);
|
||||
}(),
|
||||
builder: (context, snapshot) {
|
||||
return _InfoColumn(
|
||||
label: AppLocalizations.of(context)
|
||||
.monthlyExpense,
|
||||
value: snapshot.data ?? '-',
|
||||
alignment: CrossAxisAlignment.end,
|
||||
wrapValue: true,
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -387,11 +393,13 @@ class _InfoColumn extends StatelessWidget {
|
||||
final String label;
|
||||
final String value;
|
||||
final CrossAxisAlignment alignment;
|
||||
final bool wrapValue;
|
||||
|
||||
const _InfoColumn({
|
||||
required this.label,
|
||||
required this.value,
|
||||
this.alignment = CrossAxisAlignment.start,
|
||||
this.wrapValue = false,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -408,14 +416,27 @@ class _InfoColumn extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
value,
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Colors.white,
|
||||
if (wrapValue)
|
||||
Text(
|
||||
value,
|
||||
textAlign: TextAlign.end,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Colors.white,
|
||||
),
|
||||
)
|
||||
else
|
||||
Text(
|
||||
value,
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user