Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎么刷新单个cell #3

Open
jhfkf opened this issue Dec 1, 2020 · 2 comments
Open

怎么刷新单个cell #3

jhfkf opened this issue Dec 1, 2020 · 2 comments

Comments

@jhfkf
Copy link

jhfkf commented Dec 1, 2020

使用场景: 密码显示和隐藏

@yichahucha
Copy link
Owner

可以使用 TForm.of(context).reload(); 刷新表单,新增了一个密码输入示例可以参考一下。

TFormRow.input(
      title: "密码",
      value: "123456",
      obscureText: true,
      state: false,
      placeholder: "请输入密码",
      suffixWidget: (context, row) {
        return GestureDetector(
          onTap: () {
            row.state = !row.state;
            row.obscureText = !row.obscureText;
            TForm.of(context).reload();
          },
          child: Image.asset(
            row.state ? "lib/src/eyes_open.png" : "lib/src/eyes_close.png",
            width: 20,
            height: 20,
          ),
        );
      },
    ),

@jhfkf
Copy link
Author

jhfkf commented Dec 2, 2020

好的 万分感谢!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants