AI 接入 V1.0
UI更新
This commit is contained in:
@@ -9,6 +9,7 @@ import '../../utils/date_util.dart';
|
||||
import '../../utils/toast.dart';
|
||||
import '../../widgets/category_picker_grid.dart';
|
||||
import '../../widgets/state_views.dart';
|
||||
import '../../widgets/cute_icon.dart';
|
||||
|
||||
/// 账单编辑页(复刻 uniApp pages/bill/detail.vue 的编辑能力,并补上删除)
|
||||
class BillEditPage extends ConsumerStatefulWidget {
|
||||
@@ -117,9 +118,9 @@ class _BillEditPageState extends ConsumerState<BillEditPage> {
|
||||
Widget _typeSelector(BillEditState state, BillEditNotifier notifier) {
|
||||
return Row(
|
||||
children: [
|
||||
_typeCard('📤', '支出', 1, state, notifier),
|
||||
_typeCard('expense', '支出', 1, state, notifier),
|
||||
const SizedBox(width: 10),
|
||||
_typeCard('📥', '收入', 2, state, notifier),
|
||||
_typeCard('income', '收入', 2, state, notifier),
|
||||
],
|
||||
);
|
||||
}
|
||||
@@ -149,7 +150,7 @@ class _BillEditPageState extends ConsumerState<BillEditPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(icon, style: const TextStyle(fontSize: 20)),
|
||||
CuteIcon(icon, size: 22),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
label,
|
||||
@@ -314,7 +315,7 @@ class _BillEditPageState extends ConsumerState<BillEditPage> {
|
||||
try {
|
||||
await notifier.save();
|
||||
if (!mounted) return;
|
||||
showToast(context, '✅ 已保存');
|
||||
showToast(context, '已保存', icon: 'check');
|
||||
Navigator.of(context).pop();
|
||||
} on ApiException catch (e) {
|
||||
if (mounted) showToast(context, e.message, error: true);
|
||||
|
||||
Reference in New Issue
Block a user