How To Create A New Flutter Project In Visual Studio Code

Create-A-New-Flutter-Project-In-Visual-Studio-Code

In this Flutter tutorial, I will teach you how to create a new Flutter project in the Visual Studio Code.

There are many IDEs to develop mobile applications but I recommend you choose anyone from below.

  • Visual Studio Code
  • Android Studio

The reason for recommending these two IDEs is their high performance and rich functionality.

This Flutter tutorial teaches you how to create a new Flutter project using Visual Studio Code.

Create A New Flutter Project In Visual Studio Code

To download and install the Visual Studio Code check the link

After you have successfully installed the Visual Studio Code into your computer. Now follow the steps as mentioned below.

  1. Open the Visual Studio Code.
  2. On the left sidebar locate option number 4 which is named as extensions. Click on it.
  3. In the search bar, you have to download three extensions. Flutter, Dart and Material Icon Theme.
  4. Another extension name is “Awesome Flutter Snippets” that you should download and install as well.
Recommended:  How To Create A New Flutter Project In Android Studio

Create-New-Flutter-Project-In-VS-Code

After you have done all the above steps now you are ready to create your new Flutter project in Visual Studio Code.

Now I will teach you how to create your Flutter project in VS Code.

  1. Click on the View tab in the menu bar and select Command Palette. Shortcut Ctrl + Shift + p.
  2. Now type Flutter you will see many different options.
  3. Select the option as Flutter: New Project. Give your project any valid name just as MyApp and press enter.
  4. Choose the parent directory where you want your app to be stored in your machine.
  5. Now, wait for a few moments to the VS Code to create your new Flutter project with all the default files and codes.
  6. The file in which you work most of the time is the main.dart file.
Recommended:  Flutter Introduction A Complete Guide To The Basics

Note: When you create a new Flutter application your IDE requires you to enter a company domain name in reverse order. Reverse order use to maintain the uniqueness of your app on the Google App Store. This company domain name can’t change once it is set.

How To Run Your New Flutter App In VS Code

To run your newly created Flutter project follow the steps below.

On your VS Code and locate the status bar with blue color at the very bottom.

Status-Bar-in-the-VS-Code-for-selecting-emulator

After selecting your emulator to run your app open your main.dart file in the lib folder.

Click on the Debug -> Start Debugging or press F5.

Your app will be launch after a few moments.

Recommended:  Flutter Framework On Windows OS Complete Tutorial

The the debugging is complete your app will look like this.

New-flutter-application

Hot Reload In Flutter Flutter

Hot Reload is a great feature of Flutter. It makes the development cycle much faster. With Hot Reload if you make any changes in your code you can see the results almost instantly.

Let’s have a look at Hot Reload.

Change the piece of string

with this one

now save your code and you can see the changes in not time on your simulator or device.

Congratulations! Now you are ready to create and run your Flutter Application in the Visual Studio Code without any error.

Jack Sparrow

Hay I Am Admin Of This Website. I Am Very Passionate About Computers And Technology. This Website Is The Result Of My Passion. I Love To Eliminate The Barriers That Come In Seeking Education. This Website Is The Free Source Of Learning About New Technology And Up To Date Knowledge.

Leave a Reply

Close Menu