> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# tadashi0713/flutter-orb

Easily install Flutter SDK and package dependencies. Also easily run unit test and lint. Supports Linux and macOS


## Commands

### install_android_gem

Install your Android Rubygems(mainly fastlane) with automated caching and best practices applied. Requires lock file. https://flutter.dev/docs/deployment/cd


| Parameter | Type | Default | Description |
|---|---|---|---|
| `app-dir` | string | . | Path to the directory containing your pubspec.yaml file. Not needed if pubspec.yaml lives in the root. |
| `cache-version` | string | v1 | Change the default cache version if you need to clear the cache for any reason. |

### install_android_gradle

Install your Android gradle packages with automated caching and best practices applied. Requires build.gradle file.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `app-dir` | string | . | Path to the directory containing your pubspec.yaml file. Not needed if pubspec.yaml lives in the root. |
| `cache-version` | string | v1 | Change the default cache version if you need to clear the cache for any reason. |

### install_ios_gem

Install your iOS Rubygems(mainly fastlane) with automated caching and best practices applied. Requires lock file. https://flutter.dev/docs/deployment/cd


| Parameter | Type | Default | Description |
|---|---|---|---|
| `app-dir` | string | . | Path to the directory containing your pubspec.yaml file. Not needed if pubspec.yaml lives in the root. |
| `cache-version` | string | v1 | Change the default cache version if you need to clear the cache for any reason. |

### install_ios_pod

Install your iOS cocoapods packages with automated caching and best practices applied. Requires lock file.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `app-dir` | string | . | Path to the directory containing your pubspec.yaml file. Not needed if pubspec.yaml lives in the root. |
| `cache-version` | string | v1 | Change the default cache version if you need to clear the cache for any reason. |

### install_pub

Install your flutter packages with automated caching and best practices applied. Requires lock file.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `app-dir` | string | . | Path to the directory containing your pubspec.yaml file. Not needed if pubspec.yaml lives in the root. |
| `cache-version` | string | v1 | Change the default cache version if you need to clear the cache for any reason. |

### install_sdk

Install Flutter SDK


| Parameter | Type | Default | Description |
|---|---|---|---|
| `version` | string | 2.2.3 | The target version for the Flutter SDK. |

### install_sdk_and_pub

Install Flutter SDK and your flutter packages with automated caching and best practices applied. Requires lock file.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `app-dir` | string | . | Path to the directory containing your pubspec.yaml file. Not needed if pubspec.yaml lives in the root. |
| `cache-version` | string | v1 | Change the default cache version if you need to clear the cache for any reason. |
| `flutter_version` | string | 2.2.3 | The target version for the Flutter SDK. |

## Jobs

### lint

Run static analysis(flutter analyze)


| Parameter | Type | Default | Description |
|---|---|---|---|
| `app-dir` | string | . | Path to the directory containing your pubspec.yaml file. Not needed if pubspec.yaml lives in the root. |
| `cache-version` | string | v1 | Change the default cache version if you need to clear the cache for any reason. |
| `version` | string | 2.2.3 | The target version for the Flutter SDK. |

### unit_test

Run Unit Test


| Parameter | Type | Default | Description |
|---|---|---|---|
| `app-dir` | string | . | Path to the directory containing your pubspec.yaml file. Not needed if pubspec.yaml lives in the root. |
| `cache-version` | string | v1 | Change the default cache version if you need to clear the cache for any reason. |
| `version` | string | 2.2.3 | The target version for the Flutter SDK. |

## Examples

### install_for_android_machine

Install Flutter SDK and packages for Android machine executor


```yaml
version: '2.1'
orbs:
  android: circleci/android@1.0.3
  flutter-orb: tadashi0713/flutter-orb@1.2.0
jobs:
  distribute:
    executor:
      name: android/android-machine
    steps:
      - flutter-orb/install_sdk_and_pub:
          version: 2.2.3
      - flutter-orb/install_android_gradle
      - flutter-orb/install_android_gem
      - run:
          command: bundle exec fastlane distribute
          working_directory: ios
workflows:
  distribute:
    jobs:
      - distribute
```

### install_for_macos

Install Flutter SDK and packages for macOS


```yaml
version: '2.1'
orbs:
  flutter-orb: tadashi0713/flutter-orb@1.2.0
jobs:
  distribute:
    macos:
      xcode: 12.5.1
    steps:
      - flutter-orb/install_sdk_and_pub:
          version: 2.2.3
      - flutter-orb/install_ios_pod
      - flutter-orb/install_ios_gem
      - run:
          command: bundle exec fastlane distribute
          working_directory: ios
workflows:
  distribute:
    jobs:
      - distribute
```

### lint

Run static analysis(flutter analyze)


```yaml
version: '2.1'
orbs:
  flutter-orb: tadashi0713/flutter-orb@1.2.0
workflows:
  test:
    jobs:
      - flutter-orb/lint:
          version: 2.2.3
```

### unit_test

Run Unit Test


```yaml
version: '2.1'
orbs:
  flutter-orb: tadashi0713/flutter-orb@1.2.0
workflows:
  test:
    jobs:
      - flutter-orb/unit_test:
          version: 2.2.3
```