Then the most important thing is to make is possible to customize the path and the name of those files, just like -out lets us do it for firebase_options.dart. You could also make it so that flutterfire configure doesn't generate any of those files by default, and then add a command to flutterfire that adds those files for native plugins, something like flutterfire configure-native-plugins, but maybe that's overkill. Is it already in the current version, but just undocumented? Second of all, there should be an equivalent option to this one for the app-id-json and that's great that you added that. There are a lot of projects that only use firebase core, auth and firestore, but not analytics, crashlytics and performance. For example, in the CLI documentation, on the line about -apply-gradle-plugin there should be a mention explaining why you might not need to apply the gradle plugin and create the google-services.json file. The first thing is to document why those files can be necessary. It can be done, but it's error prone and the whole point of flutterfire is to automate all this configuration.Īny serious project would use multiple flavors, so I believe this is a very important feature to add. rename and copy the generated firebase_options.dart into the main Flutter app for each flavor.create 3 mock Flutter projects to match the package names of each of my desired flavors.Note: I use very_good_cli to automate the process of creating an app with multiple flavors, but the same applies if multiple flavors are created manually.Īs it stands, the only reliable way of getting this to work is to: then it should create firebase_options_dev.dart, firebase_options_staging.dart, firebase_options_prod.dart files that can be imported in each of the entry points (in my case I have main_development.dart, main_staging.dart, main_production.dart).flutterfire should detect if the app is configured with multiple flavors, and ask if I want to use/create a separate Firebase project for each.Note how it detected _flavors as the Android app (non-flavored version) and it asked for the bundle ID on iOS and macOS. I Registered a new Firebase web app on Firebase project flutterfire-flavors-dev. I Firebase web app flutterfire_flavors (web) is not registered on Firebase project flutterfire-flavors-dev. I Registered a new Firebase macos app on Firebase project flutterfire-flavors-dev. I Firebase macos app -flavors is not registered on Firebase project flutterfire-flavors-dev. ✔ Which macos bundle id do you want to use for this configuration, e.g. I Registered a new Firebase ios app on Firebase project flutterfire-flavors-dev. I Firebase ios app is not registered on Firebase project flutterfire-flavors-dev. ✔ Which ios bundle id do you want to use for this configuration, e.g. I Registered a new Firebase android app on Firebase project flutterfire-flavors-dev. I Firebase android app _flavors is not registered on Firebase project flutterfire-flavors-dev. ✔ Which platforms should your configuration support (use arrow keys & space to select)? I New Firebase project flutterfire-flavors-dev created succesfully. ✔ Enter a project id for your new Firebase project (e.g. ✔ Select a Firebase project to configure your Flutter application with
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |