On this web page, it says that you can now have multiple Firestore databases in a google cloud project.
cloud.google.com
Does this also mean that you can access multiple Firestore databases in a single Flutter app? If so, are there any docs that explain how to do this e.g. what does the firebase_options.dart file have in it and does the Flutterfire CLI tool allow you to set up access to more than one Firestore database.
2
Answers
When it comes to Android, starting with Cloud Firestore version 24.7.0, it:
This means that we can have multiple Firestore database instances in a single project. However, I cannot see this option in Flutter yet. You can only create an instance by calling FirebaseFirestore.instance or by calling by calling FirebaseFirestore.instanceFor.
So in my opinion it’s a matter of time until we’ll get the same option in Flutter too.
firebaser here
Good catch! It looks like the ability to connect to a non-default database isn’t in our Flutter SDKs yet. I just filed issue #11414 on the GitHub repo for it, so follow that to check on its status.