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

choiceLoader: getUsers("element") ????. Why can not use Future Function with parameter. #15

Closed
tuemaytinh1981 opened this issue Oct 18, 2020 · 1 comment

Comments

@tuemaytinh1981
Copy link

I have code:

Future<List<C2Choice>> getChildHashTags(String element) async {
.....
}

then:

choiceLoader: getChildHashTags("cat")

=> show error:
The argument type 'Future<List<C2Choice>>' can't be assigned to the parameter type 'Future<List<C2Choice>> Function()'.

Thanks.

@LAUBENicolas
Copy link

Hi, maybe you could try:

choiceLoader: () {
      getChildHashTags("cat");
}

So that your principal function isn't async :)

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