how to install Flutter correctly using asdf
At Twiage, we maintain a Flutter project called STAT, a complete rewrite of a native mobile app. To be honest, I was never a fan of Flutter or Dart. I always felt uncomfortable working with them.
Since 2020 I have experimented with both Flutter and React Native, and until recently React Native was my go-to for cross-platform mobile development. Flutter felt clunky in comparison, and I wrote it off.
What made me like React Native:
- built-in TypeScript support
- a huge and active JavaScript community
- compatibility with almost every JS library
- a simple and fast install
- Expo makes things easier
I worked with React Native up to version 0.72.0.
why I initially disliked Flutter
Section titled “why I initially disliked Flutter”My frustration came from two things:
- it competes directly with React Native.
- it uses Dart, a language that is not JavaScript and does not try to be.
Dart, my old enemy
Section titled “Dart, my old enemy”I held a grudge against Dart for trying to replace JavaScript. Dart is not backward compatible with JS and shares little syntax. For a long time, I did not want to learn it.

installing Flutter the right way (with asdf)
Section titled “installing Flutter the right way (with asdf)”Installing Flutter can be frustrating, especially with JDK version issues and path configuration. That is where asdf helps: a version manager that saved me time.
Here is a step-by-step guide to set up Flutter with asdf.
step 1: install Flutter via asdf
Section titled “step 1: install Flutter via asdf”asdf plugin add flutterasdf install flutter lateststep 2: set up the correct JDK version
Section titled “step 2: set up the correct JDK version”You will likely hit a JDK warning when running flutter doctor. Flutter expects a specific JDK version, usually JDK 17.
asdf plugin add javaasdf install java adoptopenjdk-17.0.0+12asdf local java adoptopenjdk-17.0.0+12Point Flutter to the correct JDK directory:
flutter config --jdk-dir $(asdf where java)step 3: create and run a Flutter project
Section titled “step 3: create and run a Flutter project”flutter create myappcd myappflutter runfinal thoughts
Section titled “final thoughts”Despite the rocky start with Flutter and Dart, I started to appreciate what they bring. With asdf, installing and managing Flutter and Java versions is much more manageable, especially in a multi-language setup.
If you are coming from React Native, the transition can be frustrating, but tools like asdf make Flutter more approachable.
Read the asdf docs for more. If you have questions about your mobile setup, reach out.