Amazon.co.uk Widgets

Log in

X
Flutter Logo

Flutter πŸ’™ development on a Chromebook 

It is a revelation to have Android Studio, ChromeOS and Android all running simultaneously on a Chromebook. The Android subsystem is not an emulator either it is the full ChromeOS Android implementation. It all works beautifully.

ChromeOS is a very good choice for a development environment for Flutter based apps. The Chromebook needs to be capable of supporting Linux and Google Play, and all Chromebooks available new now do. But, I'd still recommend seeking out an original Google Pixelbook i7, with 16GB Ram and a 512GB SSD (at Computer Exchange for Β£290 in Spring 2024 - Google Pixelbook/i7-7Y75/16GB Ram/512GB SSD/13"/ChromeOS/B) or a newer Google Pixelbook Go i7, with 16GB Ram and a 256GB SSD (at Computer Exchange for Β£370 in Spring 2024 - Google Pixelbook Go/i7-8500Y/16GB Ram/256GB SSD/13"/ChromeOS/Just Black/B). These are still the best development chromebooks. Cheap chromebooks are awful. These are not! They make almost perfect development machines, excepting that you cannot build for iOS or macOS on a Chromebook, you will need a Mac for that!

Android Studio, on a Chromebook, running a Flutter Android app on Android for ChromeOS, with all hot reload and debugging
Android Studio, on a Chromebook, running a Flutter Android app on Android for ChromeOS, with all hot reload and debugging

TL:DR β€” This is way more difficult than it should be because the instructions on the flutter web site don't represent the reality of working with ChromeOS. They need a rewrite. This set of steps works!

Chromebook compatibility

It is easy to check Chromebook suitability for development. In Chromebook Settings scroll to the bottom. If you see 'Apps', and the settings for the Google Play store, and have Linux in developer settings you are good to go, provided you have sufficient disk space. If you dont see the Android or Linux settings at all and can't turn them on it is time to trade in that Chromebook for a newer model. You will not be able to use it for development.

Chromebook App Settings showing Google Play
Chromebook App Settings showing Google Play
Chromebook Developer Settings showing Linux
Chromebook Developer Settings showing Linux

Installing Flutter on a Chromebook with Android Studio

  • Enable Linux on your Chromebook.
  • Then run $ sudo apt update && sudo apt upgrade to get your system to the perfect state of updatedness.
  • Download the latest stable release of the Flutter SDK bundle from its archive. Downloads isn't visible to the Linux system on your Chromebook so use the files app to move the bundle from 'Downloads' to 'Linux files'.
  • Then extract the SDK $ tar xvf flutter_linux_3.19.4-stable.tar.xz.
  • Move the newly created flutter folder to a suitable location, I chose /usr/local/bin/ but you might choose differently. $ sudo mv flutter /usr/local/bin.
  • To run Flutter commands in a shell, add Flutter to the PATH environment variable, $ echo 'export PATH="/usr/local/bin/flutter/bin:$PATH"' >> ~/.bash_profile. Restart your terminal to adopt the new path.
  • Now you can run $ flutter doctor and pay attention to any issues. I have supressed linux and web development using $ flutter config --no-enable-linux-desktop and $ flutter config --no-enable-web as this Chromebook is only for Android work.
  • Now Flutter doctor reports that flutter is ready for work.
    $ flutter doctor
    Doctor summary (to see all details, run flutter doctor -v):
    [βœ“] Flutter (Channel stable, 3.19.4, on Debian GNU/Linux 12 (bookworm)
        6.6.13-00891-g1af58030b5c8, locale en_US.UTF-8)
    [βœ“] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    [βœ“] Android Studio (version 2023.2)
    [βœ“] Connected device (1 available)
    [βœ“] Network resources
    
    β€’ No issues found!
    
    At some point during installing you'd have been asked to allow a debug connection. If you did your device is connected.
    $ flutter devices
    Found 1 connected device:
      Google Pixelbook Go (mobile) β€’ emulator-5554 β€’ android-x64 β€’ Android 11 (API 30)
    
  • Verify that you have the following tools installed: bash, file, mkdir, rm, which. $ which bash file mkdir rm which.
  • Install Android Studio from the website download which will find the correct version and OS. (Android Studio Iguana | 2023.2.1 Patch 1 for ChromeOS).
  • Agree the terms and allow it to download. You'll get a badge!
    Developer Profile Badge for Android Studio
    Developer Profile Badge for Android Studio
  • Open the Files app and locate the DEB package in the Downloads folder under My files.
    Right-click the DEB package and select Install with Linux.
    Chromebook DEB package file Install with Linux
    Chromebook DEB package file Install with Linux
  •  Confirm the installation and the installer will run. It might take a while!
    Chromebook DEB package file Install Confirmation
    Chromebook DEB package file Install Confirmation
    Chromebook DEB package file Installing
    Chromebook DEB package file Installing
  • Complete the Android Studio Setup Wizard, which includes downloading the Android SDK components that are required for development. Make sure you have Android SDK Platform, API 34.0.0, Android SDK Command-line Tools, Android SDK Build-Toolsand Android SDK Platform-Tools.
    Key part of the Android Studio setup wizard is to ensure the Command Line tools are installed!
    Key part of the Android Studio setup wizard is to ensure the Command Line tools are installed!
  • Once the installation is complete, launch Android Studio from the Launcher or from the ChromeOS Linux terminal. In the default installation directory $ /opt/android-studio/bin/studio.sh.
  • Choose to Create a Flutter app, and point the app at the location of your flutter SDK, /usr/local/bin/flutter and let Android Studio configure itself. Once it completes, press the 'Run' button and you should see the Android app build, install itself on Android on your Chromebook and run. Just like the first screenshot in this article.

Resources

Original 2017 Pixelbook specification

Pixelbook Go specification

Flutter for ChromeOS is available from flutter.dev.