How to Create and Run Dart Application in Visual Studio Code

With the Dart plugin, you can use Visual Studio Code (VS Code) to develop Dart apps. The Flutter site has details on how to set up and use VS Code for Flutter apps.

Follow the below steps to install the dart SDK:

Step 1: Open Get the Dart SDK website.

Step 2: Click and “Downloading the SDK as a zip file.

Step 3: Based on your device’s architecture, Click the “Dark SDK” for Windows or Mac or Linux, accordingly.

Step 4: Once the download is complete, go to the “Downloads” folder and unzip the newly downloaded Dart-SDK zip file.

Step 4: Copy this file and paste it in the “Program Files” folder in the “C” drive.

Step 6: Open “dart-sdk” folder and you will find a folder named “bin”.

Step 7: Now, right-click on the “bin” folder and choose “Properties”.

Step 8: In the “bin Properties” window, go to “Security” and copy the “Object Name”, also known as the address of the file, and press “Ok”.

 

 

Setup:

Step 1: Open “This PC” folder, right-click inside this folder, and choose “Properties”.

Step 2: In the “System” window, select “Advanced system settings” that will be available on the left-hand side of the window.

Step 3: In the “Advanced” tab, press the “Environment Variables…” button.

Step 4: In the “Environment Variables” window, under “User Variables for…” check for the “Path” variable.

Step 5: If it’s available, then press the “Edit” button, press “New” button in the “Edit environment variable” window, add the copied address to it and save the made changes.

Step 6: If it’s unavailable, then create one by pressing the “New” button and entering the “Variable Name” as “Path” and “Variable Value” as the copied address, and press “Ok”. ( this type path: C:\Program Files\dart-sdk\bin ).

 

 

Step 7: Now open the Command Prompt (cmd) and type “dart”.

 

Leave a Reply