AI 接入 V1.0
UI更新
This commit is contained in:
@@ -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'])),
|
||||
|
||||
@@ -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(),
|
||||
);
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user