https://github.com/spaceship-prompt/spaceship-flutter
๐ Flutter section for Spaceship prompt
https://github.com/spaceship-prompt/spaceship-flutter
Last synced: 3 months ago
JSON representation
๐ Flutter section for Spaceship prompt
- Host: GitHub
- URL: https://github.com/spaceship-prompt/spaceship-flutter
- Owner: spaceship-prompt
- License: mit
- Created: 2022-10-07T13:38:11.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-14T09:37:45.000Z (over 2 years ago)
- Last Synced: 2025-04-12T20:52:44.563Z (3 months ago)
- Language: Shell
- Homepage:
- Size: 15.6 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
๐ + ๐
Spaceship Flutter
A Flutter section for Spaceship promptCurrent Flutter version, through flutter (`๐`).
## Installing
You need to source this plugin somewhere in your dotfiles. Here's how to do it with some popular tools:
### [Oh-My-Zsh]
Execute this command to clone this repo into Oh-My-Zsh plugin's folder:
```zsh
git clone https://github.com/spaceship-prompt/spaceship-flutter.git $ZSH_CUSTOM/plugins/spaceship-flutter
```Include `spaceship-flutter` in Oh-My-Zsh plugins list:
```zsh
plugins=($plugins spaceship-flutter)
```### [zplug]
```zsh
zplug "spaceship-prompt/spaceship-flutter"
```### [antigen]
```zsh
antigen bundle "spaceship-prompt/spaceship-flutter@main"
```### [antibody]
```zsh
antibody bundle "spaceship-prompt/spaceship-flutter"
```### [zinit]
```zsh
zinit light "spaceship-prompt/spaceship-flutter"
```### [zgen]
```zsh
zgen load "spaceship-prompt/spaceship-flutter"
```### [sheldon]
**Important!!** Make sure the flutter section is loaded before `spaceship-prompt` itself, see below.
Add the plugin with the Sheldon command
```
sheldon add spaceship-flutter --github spaceship-prompt/spaceship-flutter
```
or edit your `plugins.toml` file directly with `sheldon edit`.
```toml
[plugins][plugins.spaceship-flutter]
github = 'spaceship-prompt/spaceship-flutter'[plugins.spaceship]
github = 'spaceship-prompt/spaceship-prompt'
```### Manual
If none of the above methods works for you, you can install Spaceship manually.
1. Clone this repo somewhere, for example to `$HOME/.zsh/spaceship-flutter`.
2. Source this section in your `~/.zshrc`.### Example
```zsh
mkdir -p "$HOME/.zsh"
git clone --depth=1 https://github.com/spaceship-prompt/spaceship-flutter.git "$HOME/.zsh/spaceship-flutter"
```For initializing prompt system add this to your `.zshrc`:
```zsh title=".zshrc"
source "~/.zsh/spaceship-flutter/spaceship-flutter.plugin.zsh"
```## Usage
After installing, add the following line to your `.zshrc` in order to include Flutter section in the prompt:
```zsh
spaceship add flutter
```## Options
The `flutter` section displays the current version and channel of Flutter.
This section is displayed only when the current directory is within a [Dart](https://dart.dev/) project
with [Flutter](https://flutter.dev/) dependency.| Variable | Default | Meaning |
| :--------------------------------- | :--------------------------------: | ----------------------------------- |
| `SPACESHIP_FLUTTER_SHOW` | `true` | Show section |
| `SPACESHIP_FLUTTER_ASYNC` | `true` | Render section asynchronously |
| `SPACESHIP_FLUTTER_PREFIX` | `$SPACESHIP_PROMPT_DEFAULT_PREFIX` | Section's prefix |
| `SPACESHIP_FLUTTER_SUFFIX` | `$SPACESHIP_PROMPT_DEFAULT_SUFFIX` | Section's suffix |
| `SPACESHIP_FLUTTER_SYMBOL` | `๐ยท` | Symbol displayed before the section |
| `SPACESHIP_FLUTTER_COLOR` | `blue` | Section's color |
| `SPACESHIP_FLUTTER_CHANNEL_SHOW` | `true` | Show channel |
| `SPACESHIP_FLUTTER_CHANNEL_PREFIX` | `` | Channel's prefix |
| `SPACESHIP_FLUTTER_CHANNEL_SUFFIX` | `` | Channel's suffix |
| `SPACESHIP_FLUTTER_CHANNEL_SYMBOL` | `.#` | Symbol displayed before the channel |## License
MIT ยฉ [Peter Merikan](http://merikan.com) and [Denys Dovhan](http://denysdovhan.com)
[Oh-My-Zsh]: https://ohmyz.sh/
[zplug]: https://github.com/zplug/zplug
[antigen]: https://antigen.sharats.me/
[antibody]: https://getantibody.github.io/
[zinit]: https://github.com/zdharma/zinit
[zgen]: https://github.com/tarjoilija/zgen
[sheldon]: https://sheldon.cli.rs/