We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 69f1b80 + 8b02b3a commit cfc6294Copy full SHA for cfc6294
documentation/zh_CN/state_management.md
@@ -352,18 +352,18 @@ class User() {
352
353
// controller
354
final user = User().obs;
355
-//当你需要更新用户变量时。
+//当你需要更新user变量时。
356
user.update( (user) { // 这个参数是你要更新的类本身。
357
user.name = 'Jonny';
358
user.age = 18;
359
});
360
-// 更新用户变量的另一种方式。
+// 更新user变量的另一种方式。
361
user(User(name: 'João', age: 35));
362
363
// view
364
Obx(()=> Text("Name ${user.value.name}: Age: ${user.value.age}"))
365
// 你也可以不使用.value来访问模型值。
366
-user().name; // 注意是用户变量,而不是类变量(首字母是小写的)。
+user().name; // 注意是user变量,而不是类变量(首字母是小写的)。
367
```
368
369
你可以使用 "assign "和" assignAll "。
0 commit comments