With the launch of Linux app support on Chrome OS, a new era of Android development has now emerged on Chromebooks. This also includes Flutter, Google’s cross-platform app development framework which has recently left Beta with its 1.0 release. Here’s a quick guide to installing Flutter on Chrome OS.
How to install Flutter on Chrome OS
- Install Android Studio
- Install dependencies
- Download Flutter
- Install Flutter
- Run Flutter Doctor
- Install the Flutter plugin for Android Studio (Optional)
- Install VS Code (Optional)
1. Install Android Studio
Before we can install Flutter on Chrome OS, you first need to install Android Studio and set up your device for debugging. This is actually not the easiest thing to do, so be sure to check out our handy in-depth guide to installing Android Studio.
2. Install dependencies
Next we’ll need to install a few extra things. The first of which is a text editor for Linux. The one I use in this guide is called ‘nano’, but there are plenty of other options. The other thing to install is a dependency for building Flutter apps. Conveniently, we can install them both with one simple command. Open up the Terminal app and enter the following command:
sudo apt-get install nano lib32stdc++6
Press Y then Enter to confirm installation.
3. Download Flutter
Now it’s time to download the Flutter SDK. Head over to Flutter’s Downloads page to pick up the latest version for Linux.
When the download completes, open the Files app and copy it from your Downloads folder to Linux Files.
4. Install Flutter
Open the Terminal app and run the following command to unzip Flutter (take note of the file name, as it may have changed since this article was written):
tar xf flutter_linux_v1.0.0-stable.tar.xz
Next we’ll need to put Flutter’s tools into our PATH to make them easily accessed from Terminal in the future. To do this we’ll use our trusty text editor to carefully edit a file that will let us make permanent adjustments to the Linux system PATH. In Terminal, run this command:
sudo nano .bashrc
This will open up a simple text editor in the Terminal. Use the arrow keys to scroll to the bottom of the file, press Enter to put a new line, and add the following text:
When you’re done, press Ctrl-O then Enter to save, then Ctrl-X to exit nano. Close Terminal and open it again to apply the changes.
5. Run Flutter Doctor
Now you’re almost done! Flutter is installed, but there’s a few things we need to double-check with Flutter before starting to code. Thankfully, Flutter includes a convenient ‘doctor’ to check these things automatically. Run this command in Terminal to automatically download everything else Flutter needs, and verify that your Android installation is correct.
You may also need to run one more command to review and accept the licenses for the Android SDK.
flutter doctor --android-licenses
6. Install the Flutter plugins for Android Studio (Optional)
I personally believe that Android Studio is a bit too heavyweight for most Chromebooks, even the Pixelbook, but if it’s your preference to use it for Flutter, you’ll need the Flutter Android Studio plugins. Otherwise, you can skip this step.
Open Android Studio, then go to File > Settings. In the Settings window, click Plugins on the left side, then click Browse repositories. In this new window there will be a search bar. Type in Flutter, and install the first result. Restart Android Studio to apply the change.
You’re now ready to develop apps with Flutter on Chrome OS via Android Studio!
7. Install Visual Studio Code (Optional)
The best alternative editor for developing Flutter apps is, surprisingly, Microsoft’s Visual Studio Code. This is thanks to the high-quality (originally third-party, now official) Dart Code plugin, which is actually developed by a friend of mine. (Cheers, Danny!) If you wish to develop exclusively in Android Studio, you can skip this step.
Head over to Visual Studio Code’s home page and download the .deb package. When the download completes, copy the file to Linux Files, then double-click it there to install. Visual Studio Code will now appear in your Launcher.
Open Visual Studio Code, and click the Extensions icon (the bottom-most icon on the left-hand side). In the Extensions menu that opens, type “Flutter” into the search bar. Click Install on the first result, then Reload.
You can now develop apps with Flutter on Chrome OS via Visual Studio Code.