Setup your Emulator for vs code
What is an Emulator:
In app development, an emulator is like a virtual version of a device or system that allows developers to test their apps on different types of devices, like smartphones or tablets, without actually having those devices. It helps developers make sure their apps work correctly on various devices before they're released to the public. Emulators are like "pretend" devices for testing.
Problem I faced after installing the Flutter in my system
After successfully installing Flutter on my Windows computer, I ran into a situation where the emulator didn't work as expected. Instead, Flutter ran as a web application. But here's the catch: this wasn't actually a problem with the installation. It was my mistake. I forgot to set up the emulator properly in Visual Studio Code (VS Code) before trying to run my app.
This is a common mistake that many developers can make. To avoid it, always make sure your emulator is set up correctly in your development environment. That way, you can test your apps smoothly and avoid these kinds of issues.
This is how you can setup your Emulator
I initiated the emulator in Android Studio prior to launching my Flutter application. However, it's worth noting that Android Studio is not a mandatory requirement for creating or running a virtual device. An alternative approach involves utilizing the SDK Manager and AVD Manager tools, which are components of the Android SDK toolkit. By employing these tools, developers can efficiently manage virtual devices without the need for Android Studio's full development environment. This offers flexibility in the development workflow, allowing developers to select the most suitable tools for their specific needs.
Here's how you can do this:
press ctrl+shift+p to open the Command Palette in your VS Code and search for Flutter: Launch Emulator
Execute this to get your Emulator up and running.