firebase / firebase/FirebaseUI-Flutter

firebase_ui_oauth: Pre-compile svg icon assets using `vector_graphics_compiler`

Aperta
#247 3 commenti 4 reazioni 0 assegnatari Vedi su GitHub
enhancement Keep Open oauth
Lingua principale
Dart
Stelle
151
Fork
141
Merge medio
2g 10h
PR unite (30g)
3

Descrizione

### Discussed in https://github.com/firebase/FirebaseUI-Flutter/discussions/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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.