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

Delegate传参问题 #351

Open
trustyboy opened this issue Sep 21, 2023 · 1 comment
Open

Delegate传参问题 #351

trustyboy opened this issue Sep 21, 2023 · 1 comment

Comments

@trustyboy
Copy link

请问Delegate 方法带参数支持吗?

看到test_case中

@FairWell("_refresh")//TODO:方法带参数怎么办?
  Future<void> _refresh() async {
    await Future.delayed(Duration(seconds: 3), () {
      setState(() {
        list = List.generate(Random().nextInt(20) + 15, (i) => 'Item $i');
      });
    });
  }

如果还不支持传参,那这个问题怎么解决呢?

@xiwuxisheng
Copy link

我也同问,似乎用fairwell和delegate配合无法传参,没法传参的话,这玩意只能是半自动化,页面可以,逻辑一塌糊涂,只方便用于静态页面

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