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

firebase_ui_oauth: Pre-compile svg icon assets using vector_graphics_compiler #247

Open
lesnitsky opened this issue Jan 5, 2024 Discussed in #240 · 0 comments
Open
Labels
enhancement New feature or request oauth

Comments

@lesnitsky
Copy link
Member

Discussed in #240

Originally posted by aebrahim January 4, 2024
The social login icons are packaged as strings containing the raw svg, which are then rendered using flutter_svg. However, under the hood, using flutter_svg means also including its dependency vector_graphics_compiler with the application, which at runtime converts raw svg to a compiled VectorGraphic to display.

Given that the svg string is known at build time, it is possible to pre-compile it as a VectorGraphic at build time. Advantages:

  1. Would no longer pull in the vector_graphics_compiler dependency, which adds ~180 KB to the build.
  2. Slightly more efficient runtime as the precompiled VectorGraphic can be a const.
@lesnitsky lesnitsky added enhancement New feature or request oauth labels Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request oauth
Projects
None yet
Development

No branches or pull requests

1 participant