mattermoran / map_launcher

Flutter plugin for launching maps
MIT License
265 stars 125 forks source link

Please use SVG map icons #17

Closed shinsenter closed 4 years ago

shinsenter commented 4 years ago

Please use minified SVG map icons to reduce app size.

mattermoran commented 4 years ago

Hey. I agree that as the list of supported maps grows the size of the plugin will also grow. Flutter doesn't natively support rendering svgs. People would have to use something like flutter_svg for rendering them which is going to be a breaking change. I think it might make sense for this to go into the future 1.0 release

shinsenter commented 4 years ago

@mattermoran I think adding flutter_svg as a dependency is better than adding image files. Compiled dart files (SVG files as well) are much smaller than PNGs or JPEGs.

There is no breaking changes if the map.icon stay the same parent class.

mattermoran commented 4 years ago

@shinsenter I do find it useful but again I see it as a breaking change because the api would be different. First it will require user to install "flutter_svg" package if they need an image. Making map_launcher depend on flutter_svg is not an option as some users may not even need images or they might depend on a different version of that package. Second the map.icon method currently returns AssetImage which won't work here.

If you have a solution where the api won't have to be changed at all let me know.

shinsenter commented 4 years ago

Solved with #27