Language:
Portfolio

Search

Create and Run Dart Program in Windows using cmd

  • Share this:
post-title

Follow the below instructions:

STEP 1: Open a directory and type cmd as shown below 

1-17
 

STEP 2: Command Prompt will be opened. In the Command Prompt type dart create project_name. For example, dart create test_project

1-18
 

STEP 3: Project is successfully created after that open the test_project directory and then the bin directory

1-19
 

STEP 4: In the bin directory delete the already created dart file because we will create our own file and will write a simple Hello World program.

1-21
 

STEP 5: Create a New Text Document.

1-22
 

STEP 6: Write a Hello World program as shown below

1-23
 

STEP 7: Click on the File and then on Save As 

1-24
 

STEP 8: Write the name of the file (remember to write .dart which is the extension for dart file) and select type as All Files and then click on the Save button as given below

1-25
 

 

STEP 9: Open the Command Prompt again and type dart file_name.dart such as dart test.dart to run the program.

1-27

 

Video Tutorial

 

 

Ammar Javed

Ammar Javed

Still Learning | Still Searching | Still Exploring | The secret of your success is determined by your daily agenda.