Skip to content

Firebase.initializeApp() => Is it really needed? #3385

Answered by Ehesp
Flucadetena asked this question in General
Discussion options

You must be logged in to vote

Yes it's needed. It allows us to do things like provide currentUser as a getter when your code is run rather than asynchronously requesting it.

2º- It creates a flash when it changes from the Widget display when it is not Initialize and the first screen the user will see (commented in this issue #3384

This is the compromise between having one initialiser overall or one per plugin. Either way, you're going to need to do asynchronous work and the decision was made it's best doing it once, vs individually.

3º- It has an impact on start time (very small, but flutter aims to complete with native)

You don't have to initialise it up front, you can do it whenever you need to start consuming F…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Flucadetena
Comment options

Answer selected by Ehesp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3385 on August 28, 2020 14:38.