Skip to content

Commit 7221f75

Browse files
authored
Clean reapply: Fix android flavors command docs (#12419)
- Reapplied changes from PR #12257 without workflow file issues - Removed extra commits that caused CLA check failure _Description of what this PR is changing or adding, and why:_ This PR replaces #12257 with a clean history to fix CLA issues. Only includes my intended changes without extra commits. _Issues fixed by this PR (if any):_ Fixes #12248 _PRs or commits this PR depends on (if any):_ #12257 ## Presubmit checklist - [ x] If you are unwilling, or unable, to sign the CLA, even for a _tiny_, one-word PR, please file an issue instead of a PR. - [ ] If this PR is not meant to land until a future stable release, mark it as draft with an explanation. - [ x] This PR follows the [Google Developer Documentation Style Guidelines](https://developers.google.com/style)—for example, it doesn't use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first-person pronouns). - [ x] This PR uses [semantic line breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks) of 80 characters or fewer.
1 parent 325e1ca commit 7221f75

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

src/content/deployment/flavors.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -143,27 +143,26 @@ the following steps:
143143
1. Start an Android emulator or connect a physical device
144144
with developer options enabled.
145145

146-
1. In the console, navigate to the `flavors_example`
147-
directory and enter the following command:
146+
1. In the console, navigate to the `flavors_example`
147+
directory and enter the following command:
148148

149-
```console title="console"
150-
$ flutter (run | build) --flavor <flavor_name>
151-
```
149+
```console title="console"
150+
$ flutter (run | build <subcommand>) --flavor <flavor_name>
151+
```
152152

153-
* `(run | build)`: Replace this with one of the
154-
following:
155-
* `run`: Run the app in debug mode.
156-
* `build`: Run the app in production mode.
153+
* `(run | build <subcommand>)`: Replace this with one of the following:
154+
* `run`: Runs the app in debug mode.
155+
* `build`: Builds either an APK or an appbundle.
156+
* `<subcommand>`: Either `apk` or `appbundle`.
157157

158-
* `<flavor_name>`: Replace this with the name of your
159-
Android product flavor (for example, `staging` or
160-
`production`).
158+
* `<flavor_name>`: Replace this with the name of your Android
159+
product flavor (for example: `staging`, `production`).
161160

162-
Example:
161+
Example:
163162

164-
```console title="console"
165-
$ flutter run --flavor staging
166-
```
163+
```console title="console"
164+
$ flutter build apk --flavor staging
165+
```
167166

168167
## Customize configurations
169168

@@ -361,4 +360,4 @@ the following resources:
361360
* [How to Setup Flutter & Firebase with Multiple Flavors using the FlutterFire CLI][flutterfireCLI]
362361
363362
[Build flavors in Flutter (Android and iOS) with Firebase]: {{site.medium}}/@animeshjain/build-flavors-in-flutter-android-and-ios-with-different-firebase-projects-per-flavor-27c5c5dac10b
364-
[flutterfireCLI]: https://codewithandrea.com/articles/flutter-firebase-multiple-flavors-flutterfire-cli/
363+
[flutterfireCLI]: https://codewithandrea.com/articles/flutter-firebase-multiple-flavors-flutterfire-cli/

0 commit comments

Comments
 (0)