Open In App

How to Install Dart SDK in Intellij?

Last Updated : 16 Feb, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Dart is an open-source, client-side programming language used to build web and mobile apps. It is developed by Google. It is an object-oriented programming language. Or we can say that it is a class-based and garbage-collected language with C-style syntax. It is used to create applications for different platforms like mobile, desktop, server, and web. To create an application in Dart we need a Dart SDK. Dart SDK is a collection of libraries and command-line tools that you need to develop Dart web, command-line, and server apps. It can work with different types of operating systems like Windows, Linux, macOS, etc. 

In this article, we will explain how to set up Dart SDK and use it IntelliJ. IntelliJ is an integrated development environment(IDE). It is written in Java and used for developing computer software. It is the most popular and commonly used IDE. It supports different types of programming languages like Java, Kotlin, Scala, etc, and also supports features like debugging, code inspections, unit testing, TestNG, etc. 

Installing dart sdk in Intellij

To install the dart SDK in IntelliJ(on Windows) we follow the following steps:

Download and Install Dart SDK

First of all, we install Dart SDK using the following steps:

Step 1: Navigate to the official website to get the Dart-SDK package.

Step 2: Select Windows and architecture according to your system and select the latest version i.e. (2.16.0) and a zip file will start downloading automatically.

Downloading-the-Dart-sdk

Step 3: After downloading, extract with Winrar or 7zip or any extracting software. Inside the folder, there will be another folder named Dart-SDK.

Step 4: Now copy the Dart-SDK folder and paste it in your computer’s C Drive’s Programs File (E.g.C:\Program Files) or any location of your choice.

Step 5: Go inside the Dart-SDK folder, inside there is a bin folder open it and copy the path.

Copy-bin-path

Edit Environment Variables Path

Now we edit the environment variable path using the following steps:

Step 1: Open the windows search option and search edit system environment variables and open it.

Step 2: A pop-up will open and then click environment variables and then under User variables, double click on the path and select new and paste the above mentioned copied path and click ok and come back to the home screen. (This will let your system know where the Dart-SDK files are present).

Setting-the-Environment-variables

Installing Dart SDK in intellij

Now we install Dart SDK in IntelliJ using the following steps:

Step 1: Open IntelliJ IDEA. If you still don’t have IntelliJ Idea follow this article to download and install IntelliJ Idea.

Step 2: After installing open the IntelliJ Idea and click on Plugins present on the left side and search Dart and click on install.

Installing-Dart

Step 3: Now start a new project and on the left side select Dart and then specify the path to the location where Dart-sdk is located.(E.g.C:\Program Files\dart-sdk)

Start-a-new-project

Step 4: Give the project a name and select the simple console application option. Now you are good to write programs.

Verifying Dart-SDK version and path

After setting up Dart and IntelliJ Idea let’s verify whether it has been correctly installed or not by checking the path and version. For windows open Command Prompt and for Mac/Linux open the terminal and type the following command: 

dart –version. 

It will show the installed version and path.

Verifying-Dart-sdk-version

Create Hello World Program

Once all configuration has been done, the IDE is all set for developing applications using Dart code. (A simple Hello World code, is already provided).

Create-Hello-World-Program

Similarly, you can install dart-sdk in Intellij for the Mac and Linux systems.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads