Using Terminal

Create a New Flutter Project

  1. Open your terminal and navigate to your desired project directory:

    cd ~/projects
    
  2. Create a new Flutter project:

    flutter create flutter_example_2
    

  3. 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.

Updated on