Config Dart SDK inside Intellij IDEA on MacOS

0
13377
Config Dart SDK inside Intellij IDEA on MacOS

Maybe you don’t know that you can use IntelliJ IDEA to build Dart applications, and it supports really well. In this article, I will show you how to config Dart SDK inside Intellij IDEA on MacOS.

Config Dart SDK on MacOS

At first, you will need to make sure that you’ve installed Dart SDK on your MacOS. Check out the installation guide on Dart Installation guide page.

Install Dart SDK

In short, this is how to install Dart SDK on MacOS using Homebrew.


$ brew tap dart-lang/dart
$ brew install dart

To verify your Dart version installation, type following command:


$ brew info dart
dart-lang/dart/dart: stable 2.1.0, devel 2.1.1-dev.0.1
The Dart SDK
https://www.dartlang.org/
/usr/local/Cellar/dart/2.1.0 (339 files, 300.1MB) *
  Built from source on 2019-01-04 at 23:58:06
From: https://github.com/dart-lang/homebrew-dart/blob/master/dart.rb
==> Options
--devel
	Install development version 2.1.1-dev.0.1
==> Caveats
Please note the path to the Dart SDK:
  /usr/local/opt/dart/libexec

Above is the Dart SDK info from my Mac at the time of this writing, so your Dart version might be different from mine. But there is no problem with it.

Install Dart plugin on IntelliJ IDEA

Whether you use IntelliJ IDEA Community or Ultimate Edition, you can install Dart plugin for free.

Open plugin window and search for Dart, then install the plugin.

Install Dart plugin on IntelliJ IDEA
Install Dart plugin on IntelliJ IDEA – fluttermaster.com

Config Dart SDK

When Dart plugin is installed and ready to use, you will need to config Dart plugin to use Dart SDK from your system, which has been installed through Homebrew previously.

Config Dart SDK inside IntelliJ IDEA
Config Dart SDK inside IntelliJ IDEA – fluttermaster.com

On the input box, you will need to point to the directory of Dart SDK provided by Homebrew. You can verify it using this command


$ brew info dart

It will show you the directory for Dart SDK.

Summary

It’s done!

Everything you need to develop Dart using the great coding IDE, IntelliJ IDEA, has been complete perfectly. You can start your Dart journey from now.