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.
Flutter doctor
You should see something similar
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.
Installed VsCode Cool! Now let's go ahead.
Step 3. Create New Flutter Project. ✔
- Navigate to the folder/directory where you want to create the flutter project, for example-
CD Desktop
to 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.
Step 4. Setup VsCode for Flutter Development.✔
- Open VsCode.
- Click
View > Command Palette
- Type “install”, and select
Extensions: Install Extensions
. - Type “flutter” in the extensions search field, select
Flutter
in the list, and click Install. This also installs the requiredDart
plugin.
Yehee! You just setup VsCode successfully.
Step 5. Create a Virtual Device. ✔
- Open Android Studio.
- Open AVD Manager from Settings & click create virtual device.
- Select device type & android version.
- click next & launch device.
Yehee! you successfully created your virtual android device. Now back to VsCode.
Step 6. Code a Hello World App.✔
- Open VsCode.
- Goto
Files > Open Folder >
- Select Flutter project folder which we created above 'Hello World'.
- Something similar will open.
- Click
lib>main.dart
- '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.
Top comments (0)