An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        


๐Ÿ’™ + ๐Ÿš€

Spaceship Flutter


A Flutter section for Spaceship prompt



GitHub Release


GitHub Workflow Status


Spaceship Twitter


Chat on Discord

Current 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/