Skip to content

Commit 4a14db7

Browse files
author
Elemen
committed
fix: 修复更新类目失败问题
1 parent 9c1e880 commit 4a14db7

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

ios/Runner.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
97C146E61CF9000F007C117D /* Project object */ = {
156156
isa = PBXProject;
157157
attributes = {
158-
LastUpgradeCheck = 1020;
158+
LastUpgradeCheck = 1300;
159159
ORGANIZATIONNAME = "";
160160
TargetAttributes = {
161161
97C146ED1CF9000F007C117D = {

ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1020"
3+
LastUpgradeVersion = "1300"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

lib/pages/category_info_page.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,13 @@ class _CategoryInfoPageState extends State<CategoryInfoPage> {
6060
}
6161

6262
Future _updateCategory(CategoryItem item) async {
63+
int colorId = viewModel.selectedColor;
64+
int iconId = viewModel.selectedIcon;
6365
return context.read<HomeViewModel>().updateCategory(CategoriesCompanion(
64-
name: d.Value(item.name!),
65-
iconId: d.Value(item.iconId),
66-
colorId: d.Value(item.colorId)));
66+
id: d.Value(item.id),
67+
name: d.Value(_controller.text),
68+
iconId: d.Value(iconId),
69+
colorId: d.Value(colorId)));
6770
}
6871

6972
@override

0 commit comments

Comments
 (0)