> For the complete documentation index, see [llms.txt](https://danhnhan-phung.gitbook.io/dnpi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://danhnhan-phung.gitbook.io/dnpi/android/flutter-cheat-sheet.md).

# Flutter Cheat sheet

Flutter Help:

<pre><code><strong>// shows all commands for flutter 
</strong><strong>$ flutter -h
</strong></code></pre>

Flutter Version:

```
// shows all installed flutter versions
$ flutter --Version
```

Flutter Channel:

```
// shows flutter channel. Default is stable channel. If you want to try out new
// features, switch to beta channel
$ flutter channel
```

Flutter Doctor:

```
// provides information about your flutter development environment
$ flutter doctor
```

Flutter Upgrade:

```
// upgrade Flutter to the newest version
$ flutter upgrade
```

Flutter Downgrade:

```
// downgrade flutter to the specific version
$ flutter downgrade <version>
```

{% hint style="info" %}
e.g.  flutter downgrade v2.3.2
{% endhint %}

Create new Project:

```
// Creates a new flutter app project
$ flutter create <app name>
```

{% hint style="info" %}
e.g. flutter create "newApp"
{% endhint %}

Flutter Emulators:

```
// Shows a list of available devices
$ flutter emulator
```

Flutter run emulator:

```
// Start a chosen emulator
$ flutter emulator --launch <emulator_name>
```

Start the project debug:

```
// Start the project on an available virtual device, if one is available (debug mode)
$ flutter run
```

Start the project in release mode:

```
// Start the project on an available virtual device, if one is available (release mode)
$ flutter run --release
```

Flutter Clean:

```
// Clean all files which were created during the build
$ flutter clean
```

Download project dependencies:

```
// Download all dependencies of the project
$ flutter pub get
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://danhnhan-phung.gitbook.io/dnpi/android/flutter-cheat-sheet.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
