Closed Torone closed 3 years ago
Hi @Torone!
This doesn't look related to dartz
. While I don't have access to all the type information, I believe you have multiple type errors in the code above. I would highly recommend using https://pub.dev/packages/pedantic, or better yet, https://pub.dev/packages/extra_pedantic. These packages provide good analyzer settings and should highlight unsafe type assumptions with at least e
and response.data
above, as well as provide helpful information about the actual types involved.
Hope that helps!
Thanks for your reply and useful hint!
I'm new to Flutter and also on Dartz package but I cannot find any solution online that would answer my question...
What I did is not rocket science, I'm just testing a very simple endpoint that return
{ message: 'success' }
and what I did so far is the following:And
Very simple and it also return the correct data when used. The point is that I don't like to see errors and warnings on my terminal and I wish to fix every single thing. Actually, I have the success message and 2 errors when I create the request:
How can I fix those 2 errors? What I'm doing wrong?
Thanks for your help in advance!