Skip to content

Commit

Permalink
Feat #575 : Update two pages from the docs with the new command - Bas…
Browse files Browse the repository at this point in the history
…ic Commands and Flavors
  • Loading branch information
digoreis committed Jun 7, 2024
1 parent e9ee10b commit fb01444
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docs/pages/documentation/guides/basic-commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -329,3 +329,35 @@ To destroy the FVM cache and delete all cached Flutter SDK versions, simply run:
```bash
fvm destroy
```

## Flavor

The `flavor` command is used to execute Flutter commands using a specific Flutter SDK version defined by a project flavor.

This command is particularly useful when you need to run a Flutter command (such as flutter build) with a version of the SDK associated with a particular flavor of your project.

### Usage

```bash
> fvm flavor [flavor] [flutter_command] [flutter_command_args]
```

`[flavor]`: The flavor of your project which defines the Flutter SDK version you want to use for running the command.

`[flutter_command]`: The Flutter command you want to execute.

`[flutter_command_args]`: Any additional arguments you want to pass to the Flutter command.

### Examples
**Running a Build with a Specific Flavor**:
To build your Flutter project using the Flutter SDK version associated with the `development` flavor:

```bash
> fvm flavor development flutter build
```
**Running Tests with a Different Flavor**:
If you need to run tests using the Flutter SDK version associated with the `staging` flavor:

```bash
> fvm flavor staging flutter test
```
8 changes: 8 additions & 0 deletions docs/pages/documentation/guides/project-flavors.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,12 @@ Will get the version configured for the flavor and set as the project version.
fvm use {flavor_name}
```

## Spwan a command with a flavor version

Will get the version configured for the flavor and use to run a Flutter command.

```bash
fvm flavor {flavor_name} {flutter_command} {flutter_command_args}
```


0 comments on commit fb01444

Please sign in to comment.