Flutter - Linux Install
Flutter - Linux Install
Get sta ed with Flu er 2.2. See What's new in docs, including a list of the new instructor-led video workshops!
Get sta ed Set up an edi
Linux install
1. Install
2. Set up an editor
3. Test drive
Docs Get started Install Linux
4. Write your rst app
5. Learn more
Contents
From another pla orm?
To install and run Flutter, your development environment must meet these minimum requirements:
Testing & debugging
Operating Systems: Linux (64-bit)
Pe ormance & optimization Disk Space: 600 MB (does not include disk space for IDE/tools).
Tools: Flutter depends on these command-line tools being available in your environment.
Deployment bash
curl
Resources file
git 2.x
Reference mkdir
Who is Dash? rm
unzip
Widget index
which
API reference
xz-utils
u er CLI reference zip
Package site Shared libraries: Flutter test command depends on this library being available in your environment.
libGLU.so.1 - provided by mesa packages such as libglu1-mesa on Ubuntu/Debian and mesa-libGLU on Fedora.
Once you have snapd, you can install Flutter using the Snap Store, or at the command line:
Note: Once the snap is installed, you can use the following command to display your Flutter SDK path:
$ flutter sdk-path
https://flutter.dev/docs/get-started/install/linux 1/5
8/9/2021 Flutter | Linux install
3. Test drive
For other release channels, and older builds, see the SDK releases page.
4. Write your rst app
2. Extract the le in the desired location, for example:
5. Learn more
$ cd ~/development
From another pla orm?
$ tar xf ~/Downloads/flutter_linux_2.2.3-stable.tar.xz
Flu er for Android devs
Da language overview You can also change branches or tags as needed. For example, to get just the stable version:
$ export PATH="$PATH:`pwd`/flutter/bin"
Accessibility & internationalization This command sets your PATH variable for the current terminal window only. To permanently add Flutter to your path, see
Update your path.
Pla orm integration
Resources
Note: To update an existing version of Flutter, see Upgrading Flutter.
Reference
Who is Dash?
Widget index
Run u er doctor
API reference
Run the following command to see if there are any dependencies you need to install to complete the setup (for verbose output, ad
u er CLI reference
the -v ag):
Package site
$ flutter doctor
This command checks your environment and displays a report to the terminal window. The Dart SDK is bundled with Flutter; it is n
necessary to install Dart separately. Check the output carefully for other software you might need to install or further tasks to
perform (shown in bold text).
For example:
The following sections describe how to perform these tasks and nish the setup process.
Once you have installed any missing dependencies, run the flutter doctor command again to verify that you’ve set everything u
correctly.
Warning: The flutter tool uses Google Analytics to anonymously report feature usage statistics and basic crash reports.
This data is used to help improve Flutter tools over time.
https://flutter.dev/docs/get-started/install/linux 2/5
8/9/2021 Flutter | Linux install
Flutter tool analytics are not sent on the very rst run. To disable reporting, type flutter config --no-analytics. To display
the current setting, type flutter config. If you opt out of analytics, an opt-out event is sent, and then no further information
is sent by the Flutter tool.
By downloading the Flutter SDK, you agree to the Google Terms of Service. Note: The Google Privacy Policy describes how
Get sta ed data is handled in this service.
1. Install
Moreover, Flutter includes the Dart SDK, which may send usage metrics and crash reports to Google.
2. Set up an editor
3. Test drive
5. Learn more
Update your path
You can update your PATH variable for the current session at the command line, as shown in Get the Flutter SDK. You’ll probably
From another pla orm? want to update this variable permanently, so you can run flutter commands in any terminal session.
Flu er for Android devs
The steps for modifying this variable permanently for all terminal sessions are machine-speci c. Typically you add a line to a le t
Flu er for iOS devs
is executed whenever you open a new window. For example:
Flu er for React Native devs
Samples & tutorials 4. Run source $HOME/.<rc file> to refresh the current window, or open a new terminal window to automatically source the
5. Verify that the flutter/bin directory is now in your PATH by running:
Development
Accessibility & internationalization Verify that the flutter command is available by running:
Pla orm integration
To learn more about the dart command, run dart -h from the command line, or see the dart tool page.
2. Locate the etc directory at the root of the system, and open the profile le with root privileges.
3. Update the PATH string with the location of your Flutter SDK directory.
https://flutter.dev/docs/get-started/install/linux 3/5
8/9/2021 Flutter | Linux install
For more details on setting the path in Bash, see this StackExchange question. For information on setting the path in Z shell, see t
From another pla orm?
StackOver ow question.
Flu er for Android devs
Android setup
Flu er for React Native devs
Introduction to declarative UI
Note: Flutter relies on a full installation of Android Studio to supply its Android platform dependencies. However, you can
Da language overview
write your Flutter apps in a number of editors; a later step discusses that.
Building a web app
Migration notes To prepare to run and test your Flutter app on an Android device, you need an Android device running Android 4.1 (API level 16) or
higher.
Testing & debugging
1. Enable Developer options and USB debugging on your device. Detailed instructions are available in the Android documentat
Pe ormance & optimization 2. Windows-only: Install the Google USB Driver.
3. Using a USB cable, plug your phone into your computer. If prompted on your device, authorize your computer to access your
Deployment device.
4. In the terminal, run the flutter devices command to verify that Flutter recognizes your connected Android device. By defa
Resources Flutter uses the version of the Android SDK where your adb tool is based. If you want Flutter to use a different installation of
Android SDK, you must set the ANDROID_SDK_ROOT environment variable to that installation directory.
Reference
Who is Dash?
Set up the Android emulator
Widget index
To prepare to run and test your Flutter app on the Android emulator, follow these steps:
API reference
7. In Android Virtual Device Manager, click Run in the toolbar. The emulator starts up and displays the default canvas for your
selected OS version and device.
1. Make sure that you have a version of Java 8 installed and that your JAVA_HOME environment variable is set to the JDK’s folde
Android Studio versions 2.2 and higher come with a JDK, so this should already be done.
2. Open an elevated console window and run the following command to begin signing licenses.
https://flutter.dev/docs/get-started/install/linux 4/5
8/9/2021 Flutter | Linux install
1. Install
2. Set up an editor
3. Test drive
Linux setup
4. Write your rst app
5. Learn more Warning: Beta! This area covers desktop support, which is available as a beta release. Beta support still has notable
feature gaps, including accessibility support. You can try a beta snapshot of desktop support on the stable channel, or you
From another pla orm?
can keep up with the latest changes to desktop on the beta channel. For more information, see the Desktop section in What’s
Flu er for Android devs new in Flutter 2, a free article on Medium.
Flu er for iOS devs
Introduction to declarative UI For Linux desktop development, you need the following in addition to the Flutter SDK:
Migration notes
$ flutter config --enable-linux-desktop
Testing & debugging
For more information, see Desktop support for Flutter
Pe ormance & optimization
Web setup
Deployment
Resources
Flutter has support for building web applications in the stable channel. Any app created in Flutter 2 automatically builds for the w
Reference
To add web support to an existing app, follow the instructions on Building a web application with Flutter when you’ve completed t
Who is Dash? setup above.
Widget index
API reference
Set up an edi
utter-dev@ • terms • brand usage • security • privacy • español • 社区中⽂资源 • 한국어 • We stand in solidarity with the Black community. Black Lives Matter.
Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the BSD License.
https://flutter.dev/docs/get-started/install/linux 5/5