AI 接入 V1.0
UI更新
This commit is contained in:
@@ -12,6 +12,7 @@ import '../../providers/budget_provider.dart';
|
||||
import '../../utils/amount_input_formatter.dart';
|
||||
import '../../utils/amount_util.dart';
|
||||
import '../../utils/toast.dart';
|
||||
import '../../widgets/cute_icon.dart';
|
||||
import '../../widgets/state_views.dart';
|
||||
|
||||
/// 「我的」页面
|
||||
@@ -101,7 +102,7 @@ class MinePage extends ConsumerWidget {
|
||||
height: 60,
|
||||
decoration: const BoxDecoration(shape: BoxShape.circle, color: Colors.white),
|
||||
alignment: Alignment.center,
|
||||
child: const Text('👤', style: TextStyle(fontSize: 30)),
|
||||
child: const CuteIcon('user', size: 32),
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
Expanded(
|
||||
@@ -338,7 +339,9 @@ class MinePage extends ConsumerWidget {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Text('💰 日均可用 ', style: TextStyle(fontSize: 13, color: Color(0xFF6D4C41))),
|
||||
const CuteIcon('target', size: 15),
|
||||
const SizedBox(width: 5),
|
||||
const Text('日均可用 ', style: TextStyle(fontSize: 13, color: Color(0xFF6D4C41))),
|
||||
Text(
|
||||
'¥${formatAmount(budget.remainingDaily)}',
|
||||
style: const TextStyle(
|
||||
@@ -408,7 +411,7 @@ class MinePage extends ConsumerWidget {
|
||||
padding: const EdgeInsets.symmetric(vertical: 12),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(module.icon, style: const TextStyle(fontSize: 20)),
|
||||
CuteIcon(module.icon, size: 21),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
@@ -456,7 +459,7 @@ class MinePage extends ConsumerWidget {
|
||||
|
||||
try {
|
||||
await ref.read(accountProvider.notifier).setBalance(input);
|
||||
if (context.mounted) showToast(context, '✅ 余额已更新');
|
||||
if (context.mounted) showToast(context, '余额已更新', icon: 'check');
|
||||
} on ApiException catch (e) {
|
||||
if (context.mounted) showToast(context, e.message, error: true);
|
||||
} catch (_) {
|
||||
@@ -477,7 +480,7 @@ class MinePage extends ConsumerWidget {
|
||||
|
||||
try {
|
||||
await ref.read(budgetProvider.notifier).setMonthBudget(input);
|
||||
if (context.mounted) showToast(context, '✅ 预算已保存');
|
||||
if (context.mounted) showToast(context, '预算已保存', icon: 'check');
|
||||
} on ApiException catch (e) {
|
||||
if (context.mounted) showToast(context, e.message, error: true);
|
||||
} catch (_) {
|
||||
|
||||
Reference in New Issue
Block a user