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

Icons.add_comment does not display image preview #1707

Closed
wyattbiker opened this issue May 14, 2019 · 3 comments
Closed

Icons.add_comment does not display image preview #1707

wyattbiker opened this issue May 14, 2019 · 3 comments
Labels
in editor Relates to code editing or language features is bug
Milestone

Comments

@wyattbiker
Copy link

[✓] VS Code (version 1.33.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.0.2    

    • Flutter version 1.2.1 
    • Framework revision 8661d8aecd (3 months ago), 2019-02-14 19:19:53 -0800
    • Engine revision 3757390fa4
    • Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

Icons.add_comment fails to display the image preview in VSCode, but does display correctly in app. Also previews correctly in Android Studio.

Why is this one special?

Example:

          IconButton(icon: Icon(Icons.add_a_photo)),
          IconButton(icon: Icon(Icons.add_comment)),  //fails to display image preview in vscode
          IconButton(icon: Icon(Icons.airline_seat_flat)),
@DanTup
Copy link
Member

DanTup commented May 14, 2019

It looks like this one doesn't exist in the location we normally look for icons, this is a 404:

https://storage.googleapis.com/material-icons/external-assets/v4/icons/svg/add_comment_black_36px.svg

It is available here though:

https://material.io/tools/icons/static/icons/baseline-add_comment-24px.svg

Probably we just need to update where we pull the icons from (the second URL looks less fragile too).

@wyattbiker
Copy link
Author

I guess you can just look where AS pulls it from.

@DanTup
Copy link
Member

DanTup commented May 15, 2019

Android Studio doesn't pull them from the web, it has scripts that open a Flutter app on the simulator, renders the icon, then saves them to files :)

It turns out, Flutter has icons that aren't even on the Material website (I think they have a newer version internally). So for now I've taken all the icons from the Android Studio script and put them in a repo on GitHub and switched to those URLs. I've also opened #1709 to consider adding them into the extension locally to avoid the delay (and connectivity requirement) of pulling them online.

So they'll appear in the next version, but then might get faster in some future version.

Thanks for spotting the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in editor Relates to code editing or language features is bug
Projects
None yet
Development

No branches or pull requests

2 participants