style(app): 格式化并拆分长函数

This commit is contained in:
Zhou Weidong committed 2026-10-20 04:38:36 +08:00
1 parent 2b2b7e9913
commit 7850dfc746
31 files changed
+388 -318

No files matched your search

+5 -4
View File
@@ -90,9 +90,8 @@ class _WalletPageState extends State<WalletPage> {
void _openRecharge(WalletController wallet) {
Navigator.of(context).push(
MaterialPageRoute<void>(
builder: (_) => RechargePage(
onPurchased: () => unawaited(wallet.load()),
),
builder: (_) =>
RechargePage(onPurchased: () => unawaited(wallet.load())),
),
);
}
@@ -320,7 +319,9 @@ class _LedgerTile extends StatelessWidget {
Widget build(BuildContext context) {
final positive = entry.changeAmount >= 0;
final color = positive ? AppColors.success : AppColors.accent;
final amount = positive ? '+${entry.changeAmount}' : '${entry.changeAmount}';
final amount = positive
? '+${entry.changeAmount}'
: '${entry.changeAmount}';
return Container(
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(