New post on /r/flutterdev subreddit:
<b>Stuff the docs won't tell you, re: Firebase Setup</b>
tl;dr with more details belowThis is all the stuff I had to do to get a working setup with Firebase and Flutter, utilizing Authentication and Firestore right off the bat.Copy debug.keystore to .android folder of each machine running the projectFollow manual install instructions for android (flutterfire docs)Create new upload key for the release build for android. Copy that key to each machine also (but don't check it in)Add the four keys to the firebase project settingsDownload the .json and .plist files and add them to the project appropriatelyMisc changes (but also important) to get the builds working properlyDon't shoot the messengerThis is stuff that the docs didn't tell me about setting up Firebase with a Flutter app. This is not meant to be an exhaustive explanation, but just detailing some of the "gotcha's" that comes with setting it all up. I'm also not including stuff that's found in the docs. It's in the docs.I'm also no professional. I have a couple of years professional dev experience outside of Flutter, but I've done cross-platform development on my own for almost 4 years now (back in the good old days of the really crappy versions of React Native). Flutter has come a long way and does a lot of the heavy lifting for you, but still leaves out some pretty important things if you want to have a clean setup working with multiple people on multiple machines.I'm also open for suggestions and changes to this. This is just from my experience and I had to find a lot of it out on my own via google and trial and error. I figured this could eliminate a few keyboard-forehead interactions.Main Setup ExplanationThe first thing I had to do (after much trial and error, and not a lot of information out there on the topic) was to setup my signing keys for android.It's easy if you're using one machine, but I'm using two different machines for development. I have a Windows laptop and a Macbook Pro. By default, flutter will use the debug.keystore found in the .android folder in your home directory (C:/Users/<user> directory on Windows). The problem is that this keystore is different on different computers with different installations of the Android SDK. So I copied over one keystore to the other machine to make sure I'm signing with the same key every time I run a debug build on either machine. <strong>This is important for Firebase authentication</strong> and other packages, since you have to enter in the SHA-1 and/or (I did both) SHA-256 keys that your app is signed with in the project settings of Firebase. If you have a bunch of people working on a project at the same time, it would get really tedious having to enter in another set of keys just to have them be able to run in debug mode on the project.This is all in addition to following the manual installation instructions in the <a href="
https://firebase.flutter.dev/docs/manual-installation/android">flutterfire docs</a>.For release mode for Android, I created a new upload key using the command found in the flutter docs <a href="
https://docs.flutter.dev/deployment/android#signing-the-app">here</a> and copied that key to a similar location on each machine (C:/dev, or /Users/<user>/dev). I then created a
key.properties file for each machine in the <code><project>/android</code> folder as described in the link above. This file isn't checked in or anything, so it ends up being specific to each machine. Same keystore though.I added the SHA keys from that keystore to Firebase also. You can find out what those are by going to the android folder from a terminal and running <code>./gradlew signingReport</code>. I only had 4 different keys after copying over the debug.keystore and creating the new upload-keystore.jks when running that command. So the Firebase project has a total of 4 keys, SHA-1 and SHA-256 for debug and release. I also did the rest of the stuff from the flutter docs reference above.After that, download the google-services.json…