ITNEXT
Published in

ITNEXT

Up and Running with Flutter on Pixelbook [2020]

Flutter by Google

Flutter is around for a while by now and it demonstrated that iOS and Android apps can be developed together fast and efficiently. I had to discover what Flutter was about as soon as it went live by December 2018. Before it was ready for production there weren’t a lot of libraries and frameworks on Github, there were not so many tutorials around, and searching ‘Flutter’ on YouTube wasn’t quite the expected. But having a background on iOS and Android native development helped me to fix those gaps and to ship several fully-featured applications on the markets. Fortunately, today the community is huge and all the resources are available online. It’s not a myth: building native mobile applications with a single language is possible now. Even more: it’s possible to also build desktop and web applications.

So, let’s start installing Flutter

Flutter is available for Windows, macOS, and Linux. I’m using a Google Pixelbook, which means ChromeOS+Linux. Because of the cross-platform nature of Flutter, we are now able to build cross-platform applications for those systems.
In order to install Flutter, we should follow the instructions from the official site (https://flutter.dev/docs/get-started/install). We will follow up on the instructions here, the only thing is that I will be following the instructions for ChromeOS which could defer from the others.

  • Download the installation bundle to get the latest stable release of the Flutter SDK. On this day the latest version is 1.17.3 (Link). A step that doesn’t mention the official guide is that when you download a file from Google Chrome on a ChromeOS, by default it will be downloaded in the Download folder, which is virtually separated from the Linux filesystem. You need to move the .tar.xz file from Download to Linux Files. Note that this folder, when extracted, will serve as the path of the SDK, so I will save it in a /software/ folder (Just a personal opinion, it’s a reminder not to forget where it is — it could be accidentally removed).
  • We extract the file using the tar xf command
tar xf ~/software/flutter_linux_1.17.3-stable.tar.xz
  • Update the PATH variable, not only for the current session but permanently. To do this, we need to add at the top of ~/.bashrc:
$ export PATH="$PATH:[PATH_TO_FLUTTER_DIRECTORY]/flutter/bin"
  • We double-check that the installation is correct using the command:
which flutter

At this point, we can use the Flutter command-line tools. One of the most important commands is “flutter doctor -v”.
In my case, when running fluter doctor’s command I get an error regarding Android toolchain:

Android toolchain needs to be installed to work

For most users installing Android studio is enough to fix this issue, even for ChromeOS users. But Android Studio could transform your computer into a microwave if you are using a low-spec Chromebook. Luckily Flutter gives us the option to install the Android SDK with and without installing Android Studio. I will go with the option of installing Android Studio for ChromeOS from https://developer.android.com/studio/?authuser=1#downloads.

When our ChromeOS installer (.deb) is downloaded, we right-click it and select the option “Install with Linux” and we tap “Install”:

Install with Linux from Pixelbook

When the installation is finished, we will find Android Studio installed on our dock. When launching for the first time it will start the initial setup.

When asking for the type of setup, we will choose Custom. We install the Android SDK, and when finished the program will relaunch.

Before closing Android Studio we need to install 2 more tools. For doing that we go to the bottom menu, Configure > Plugins, and search for “Flutter”. Click “Install” and will also install the Dart plugin. Restart IDE, and close it.

We open a terminal, and we type flutter doctor — android-licenses. This will accept the Android licenses, which is a required step of Flutter Doctor.

We can double-check using Flutter doctor command to see if we’re good to go:

Result of flutter doctor -v

Flutter is finally installed! In the next days, I will be uploading more Flutter content. We will create our very first Flutter app. We will go through setting the architecture up, building a small backend to do requests, and finally, we will build a fully-featured application ready to upload to the stores.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Juan

Juan

Software Engineer turned Product Manager. Entrepreneur and Writer — Italy 🇮🇹