Tyagi // Engineering Log
← Back to Codelabs

Codelab

Setting Up a Flutter Development Environment on Linux

A practical setup for Flutter + Dart on Linux — SDK install, editor config, emulator, and the gotchas that waste the first hour.

Last updated 2026-06 · 3 min read Intro
flutterdartlinuxtooling

Install the SDK

Use the version manager rather than a system package — Flutter ships its own toolchain and updates frequently enough that distro packages lag behind.

git clone https://github.com/flutter/flutter.git -b stable ~/flutter
echo 'export PATH="$PATH:$HOME/flutter/bin"' >> ~/.bashrc
source ~/.bashrc
flutter doctor

flutter doctor will flag missing Android SDK components, Chrome (for web), and Linux desktop build dependencies separately — fix them one at a time rather than guessing.

Android toolchain without Android Studio

You don’t need the full IDE just to get flutter doctor green:

sdkmanager "platform-tools" "platforms;android-34" "build-tools;34.0.0"
flutter doctor --android-licenses

Editor setup

VS Code with the official Dart/Flutter extensions covers most day-to-day work — hot reload, widget inspector, and DevTools all work over the same debug session. The pain point is usually the Dart analysis server choking on a large monorepo; if dart analyze feels slow, check .dart_tool/ isn’t being watched by a separate file watcher (fswatch, inotify limits) competing with the IDE.

Emulator vs. physical device

Emulators are fine for UI work but unreliable for anything touching platform channels — telephony, permissions, background services. For that class of bug, a physical device over USB with flutter run --verbose is the faster debugging loop, even with the extra setup friction of enabling USB debugging.

Common first-hour issues

  • flutter doctor reports a Chrome problem on a headless box — set CHROME_EXECUTABLE explicitly, or skip web target entirely if you don’t need it.
  • Gradle build first run is slow — this is expected; it’s downloading the Gradle distribution and dependencies, not a hang.
  • Hot reload stops working after a platform-channel change — platform channel and native code changes need a full restart (R in the CLI, not r), hot reload only covers the Dart layer.

inotify limits on large monorepos

Linux’s default inotify watch limit is tuned for typical desktop usage, not for a large Flutter monorepo with many packages and generated files. If the IDE’s file watcher silently stops noticing changes — edits don’t trigger hot reload, or the Dart analysis server falls behind — check cat /proc/sys/fs/inotify/max_user_watches against the actual file count under the workspace, and raise the limit via sysctl rather than assuming the IDE itself is broken. This is a one-time fix per machine, but it’s easy to lose an hour misdiagnosing it as a Flutter or editor bug the first time it shows up.

Keep multiple Flutter channels available

Working across more than one project sometimes means each one targets a different Flutter version. Rather than switching the single global SDK back and forth, cloning a second copy of the Flutter repo at a different version and pointing each project’s shell/IDE config at the right one avoids the churn of constantly running flutter channel and flutter upgrade every time you switch contexts.

Share: X LinkedIn

Related topics

Keep exploring

image_hotspot — Flutter Package

Published a Flutter package for defining interactive, clickable hotspot areas on images, useful for floor plans, diagrams, and annotated photos.

#flutter#dart#open-source

NMOLD Inventory Management Redevelopment

Contributed to redeveloping NMOLD's inventory management system on Flutter, Express, and MongoDB, replacing a legacy Python/Laravel stack, and added image recognition to reduce manual data entry.

#flutter#express#mongodb

Runo Hybrid Telephony — Cloud & GSM Calling

Contributed to hybrid telephony support at Runo — letting users call via cloud or GSM, with call-medium selection, virtual number assignment, and consistent reporting across logs, exports, and analytics.

#telephony#flutter#call-medium

Runo Product Analytics & Amplitude Instrumentation

Worked on a product analytics layer at Runo — Amplitude provider abstraction, event taxonomy, user/company traits, deduplication, and platform-aware tracking across auth, billing, CRM, and call workflows.

#amplitude#event-taxonomy#flutter