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

[PAGE ISSUE]: 'Delete data on the internet' #10577

Closed
1 task
mindeng opened this issue May 13, 2024 · 2 comments · Fixed by #10585
Closed
1 task

[PAGE ISSUE]: 'Delete data on the internet' #10577

mindeng opened this issue May 13, 2024 · 2 comments · Fixed by #10585
Labels
e1-hours Effort: < 8 hrs from.page-issue Reported in a reader-filed concern p2-medium Necessary but not urgent concern. Resolve when possible.

Comments

@mindeng
Copy link

mindeng commented May 13, 2024

Page URL

https://docs.flutter.dev/cookbook/networking/delete-data/

Page source

https://github.com/flutter/website/tree/main/src/content/cookbook/networking/delete-data.md

Describe the problem

After clicking the "Delete Data" button, the following error occurs:

image

This is because the Album.fromJson factory method throws an FormatException exception while parsing an empty json map.

Expected fix

No response

Additional context

No response

I would like to fix this problem.

  • I will try and fix this problem on docs.flutter.dev.
@mindeng mindeng added the from.page-issue Reported in a reader-filed concern label May 13, 2024
@sfshaza2
Copy link
Contributor

@johnpryan, can you take a look at this? This recipe doesn't have a DartPad instance.

@sfshaza2 sfshaza2 added p2-medium Necessary but not urgent concern. Resolve when possible. e1-hours Effort: < 8 hrs labels May 13, 2024
johnpryan added a commit that referenced this issue May 13, 2024
Fix "Delete data on the internet" cookbook sample.

The Album.fromJson method doesn't handle an empty map, which is returned from the jsonplaceholder API when the DELETE method is called. 

Fixes #10577
@johnpryan
Copy link
Contributor

I created #10585 to address this, thanks for filing an issue!

parlough added a commit that referenced this issue May 14, 2024
Fix "Delete data on the internet" cookbook sample.

The Album.fromJson method doesn't handle an empty map, which is returned
from the jsonplaceholder API when the DELETE method is called.

Fixes #10577

---------

Co-authored-by: Parker Lougheed <parlough@gmail.com>
sfshaza2 pushed a commit that referenced this issue May 14, 2024
Fix "Delete data on the internet" cookbook sample.

The Album.fromJson method doesn't handle an empty map, which is returned
from the jsonplaceholder API when the DELETE method is called.

Fixes #10577

---------

Co-authored-by: Parker Lougheed <parlough@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e1-hours Effort: < 8 hrs from.page-issue Reported in a reader-filed concern p2-medium Necessary but not urgent concern. Resolve when possible.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants