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

fix #1292

Closed
wants to merge 1 commit into from
Closed

fix #1292

wants to merge 1 commit into from

Conversation

maxzod
Copy link

@maxzod maxzod commented Oct 9, 2021

New Pull Request Checklist

  • I have read the Documentation
  • I have searched for a similar pull request in the project and found none
  • I have updated this branch with the latest master to avoid conflicts (via merge from master or rebase)
  • I have added the required tests to prove the fix/feature I am adding
  • I have updated the documentation (if necessary)
  • I have run the tests and they pass

This merge request fixes / refers to the following issues: ...
if you declare the request data type final res = await Dio().get<T>(....);
it returns nullable object T? but i have specifically told it it is not nullable when i need to be nullable i will use T? instead

this PR fixes this issues

@NicolaVerbeeck
Copy link

Does this PR also fix the case where T is nullable, this has been broken since 4.0.1 (wrong non-null cast in dio_mixin's assureResponse)

@maxzod
Copy link
Author

maxzod commented Nov 15, 2021

@NicolaVerbeeck yes

@kuhnroyal
Copy link
Member

Not sure this is the right approach. In any case, this is a breaking change as it is now required to specify T? for everything that previously worked.

@kuhnroyal
Copy link
Member

While I like the idea of explicitly specifying if the response is nullable, this will be a breaking change.
We can consider this for a 5.0.0 release if there is a general consensus. I started a discussion for this: #1335

@NicolaVerbeeck The T? problem has been fixed in #1322

@kuhnroyal kuhnroyal closed this Nov 29, 2021
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

Successfully merging this pull request may close these issues.

None yet

3 participants