We can create a flutter application from Android studio/IntelliJ, Visual studio code or from the command line directly. In this post, I will show you how to create a Flutter application from the command line.
You can move to a folder and use the below code to create one App:
flutter create myapp
It will create one new flutter application in a folder myapp in that same folder.
It is a simple demo application that uses Material Components.
The first thing we need to check the devices currently running. For that, we can use the below command:
It prints out the devices those are connected. If you don’t have an Android or iOS simulator/emulator/real device is connected, it will show the chrome.
To run the app, use the below command:
It will run it on chrome if there is not connected device. Or you can use :
flutter run -d chrome
Hot reloading allows us to make any change in the app and reload it without reinstalling it again. It also keeps the state. This makes the development process smooth and fast.
You can also use r to hot reload.