-
Notifications
You must be signed in to change notification settings - Fork 330
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
How to work with Data Model class instead of just Strings? #113
Comments
But I did receive error messages that looked very much like the ones you mention some time ago until I realized that |
@deakjahn Thanks for your input, can you please share a code snippet so I can try and see if it works. I am still having problems:/ |
I have a POCO, very simple:
When I create the widget, I just use this type:
This calls my functions but there is nothing special about them,
I return a maximum of 20 matching items. And when I return, I don't just return the result of |
Hi @aytunch , I do have the same problem when clicking on a suggestion, which is backed by a custom Model class. Displaying the list of suggestions based on the model is working fine, but clicking on the suggestion always throws the exception "... is not a subtype of type 'String'. Did you solve that issue and if so, how? Could you post the function behind your Thank you! |
I could but you won't find anything interesting there:
Just as you would expect. If I go in and change the return type of |
I get a list of Products from my backend and I convert the JSON objects in to a Product Model Class and keep them in a List.
Product class has lets say an id field and a name field.
I can display suggestions with product.name however i get an error when i click on the suggestion. Product is not a subclass of String. How can i get the whole product object when user clicks on a suggestion?
The text was updated successfully, but these errors were encountered: