Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter app with multi Firebase (for multi environment)

I'm doing an app with Flutter which has Firebase Authentification But as i want to have a "Firebase Authentification for development", i created another GCP/Firebase project to get that.

Doing this make me handle 2 google-services.json and 2 keytools SHA-1

For google-services.json file, i put one where they suggest to [android/app/] and the other on [android/app/src/], but do Gradle can know which one it has to choose ?

And for the keytools, i only can generate one, do you have any advise for this ?

Thank you for your future answer

like image 656
billyandco Avatar asked Oct 17 '25 04:10

billyandco


1 Answers

Actually you have to handle this by using flavors

You have to create a folder for each environment but there are two good tutorials about how to setup this :

  • First without dart awareness
  • Second with two dart files
like image 65
Ferdi Avatar answered Oct 18 '25 19:10

Ferdi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!