Create a New Flutter Project
-
Open your terminal and navigate to your desired project directory:
cd ~/projects
-
Create a new Flutter project:
flutter create flutter_example_2
-
Go to the project folder:
cd flutter_example_2
Step 5: Run the Flutter Web Project
Run the following command to launch the app in Chrome:
flutter run -d chrome
-
-d chrome
tells Flutter to use Chrome as the target device. -
The terminal will display a URL similar to this:
http://localhost:5000
-
Flutter will automatically open the app in Chrome. If not, you can copy and paste the URL into your browser.