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

Replacement of bitmap icons with SVG icons #27

Merged
merged 2 commits into from Jun 25, 2020
Merged

Replacement of bitmap icons with SVG icons #27

merged 2 commits into from Jun 25, 2020

Conversation

shinsenter
Copy link
Contributor

This can help reduce the size of the package after it is compiled.
Related to the issue #17.

@mattermoran
TODO: SVG files are temporarily added. Replace them with better SVG files.

@mattermoran
Copy link
Owner

Hey @shinsenter
It seem to work fine but the only problem I have with it is that it takes about a second before the icons actually show up. I guess that's because it needs to parse the svg files first but that's not very nice experience. I wonder if we can somehow speed it up so they show up instantly like pngs

@mattermoran
Copy link
Owner

mattermoran commented Jun 24, 2020

Actually I have just tried to use svg path and pass it directly to SvgPicture.asset and in that case it seems to be instant.
So it looks like _SvgImage is being slow

@mattermoran
Copy link
Owner

Seem to be fine with the flutter_svg_provider package as well. We might wanna roll with that but that's another extra dependency

@shinsenter
Copy link
Contributor Author

shinsenter commented Jun 24, 2020

@mattermoran
Because you want to not change the interface of the current version, I have to workaround to change the data type of map.icon from PictureProvider to ImageProvider, so there will be a little delay when rendering the icons.

It seems that the size of the icons affects the rendering speed, I will try reducing the size of the icons to 256pt (currently 1024pt).

@shinsenter
Copy link
Contributor Author

@mattermoran
Please review again

Copy link
Owner

@mattermoran mattermoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks way better now. Still not as fast as pngs but there's just milliseconds difference so it's fine. I will be merging this now, then update the icons and make a release. Good job!

@mattermoran mattermoran merged commit eda5220 into mattermoran:master Jun 25, 2020
@shinsenter
Copy link
Contributor Author

@mattermoran
Thank you for approval.
I think it will be faster in production mode (tested).

This was referenced Jun 25, 2020
@shinsenter shinsenter deleted the feature/svg_icons branch June 25, 2020 08:53
@mattermoran
Copy link
Owner

hey @shinsenter
version 0.7.1 with your changes is available on pub
thanks for help!

@shinsenter
Copy link
Contributor Author

@mattermoran
Great! Thank you

@aseef17
Copy link

aseef17 commented Aug 24, 2020

Why was the intl package added as a dependancy ?

@mattermoran
Copy link
Owner

@aseef17 probably by mistake. I'm pretty sure I removed it in an actual release

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