AI 接入 V1.0

UI更新
This commit is contained in:
2026-09-24 14:24:34 +08:00
parent 34bc2e04b0
commit 9a144f159f
65 changed files with 1195 additions and 196 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ class Bill {
id: asInt(json['id']),
categoryId: asInt(json['categoryId']),
categoryName: asNonEmpty(json['categoryName'], '未分类'),
categoryIcon: asNonEmpty(json['categoryIcon'], '📦'),
categoryIcon: asNonEmpty(json['categoryIcon'], 'other'),
amount: asDouble(json['amount']),
description: asString(json['description']),
billDate: parseBillDate(asString(json['billDate'])),
+1 -1
View File
@@ -17,7 +17,7 @@ class Category {
factory Category.fromJson(Map<String, dynamic> json) => Category(
id: (json['id'] as num?)?.toInt() ?? 0,
name: json['name']?.toString() ?? '',
icon: json['icon']?.toString() ?? '📦',
icon: json['icon']?.toString() ?? 'other',
type: (json['type'] as num?)?.toInt() ?? 1,
sortOrder: (json['sortOrder'] as num?)?.toInt(),
);
+1 -1
View File
@@ -68,7 +68,7 @@ class CategoryStat {
factory CategoryStat.fromJson(Map<String, dynamic> json) => CategoryStat(
categoryId: asInt(json['categoryId']),
categoryName: asNonEmpty(json['categoryName'], '未分类'),
categoryIcon: asNonEmpty(json['categoryIcon'], '📦'),
categoryIcon: asNonEmpty(json['categoryIcon'], 'other'),
amount: asDouble(json['amount']),
type: asInt(json['type'], fallback: 1) == 2 ? 2 : 1,
);