In the last post, I wrote about Flutter basics & how to install flutter in your system. If you didn't install Flutter please follow the steps given in the link here Install Flutter, Official site.
Step 1. Install Flutter ✔
I assume you installed flutter successfully in your system. I will be using windows 10 in this article. The steps will be the same for Linux & Mac Os. To check all things are ready just fire up your command prompt, terminal and type this command.
If the output is similar we are good to go, if there is some problem flutter will give the description & how to resolve it.
Step 2. Install VsCode ✔
Visit the link to download & install VsCode Install
- It's the best IDE for coding.
- IntelliSense - syntax highlighting and autocomplete with IntelliSense.
- Debug code right from the editor.
- Connect your Git or GitLab account & collaborate with team members.
- Navigate to the folder/directory where you want to create the flutter project, for example-
CD Desktopto navigate to Desktop.
- In your CMD/terminal type this command.
flutter create HelloWorld
Here, HelloWorld is the name of your project
Now Flutter will start installing files needed for our project. You should see something similar in the end.
- Open VsCode.
View > Command Palette
- Type “install”, and select
Extensions: Install Extensions.
- Type “flutter” in the extensions search field, select
Flutterin the list, and click Install. This also installs the required
- Open Android Studio.
- Open AVD Manager from Settings & click create virtual device.
- Select device type & android version.
- click next & launch device.
- Open VsCode.
Files > Open Folder >
- Select Flutter project folder which we created above 'Hello World'.
- Something similar will open.
- 'Main.dart' will open in code editor.
- Now press F5 or from above toolbar
Run > Start Debugging& select the virtual android device we created.
- Everything should be fine if you followed the steps correctly, Now an virtual device will show on your screen.
- Wait a few minutes for the app to be built and installed to the virtual device.
- WoW! You created your first android/ios app.