How to Create an Empty Flutter Project Without the Counter App Boilerplate Code

Isaias Cuvula
3 min readAug 5, 2023

--

Starting a new Flutter project is an essential part of any Flutter developer’s life. Usually, when we create a new project by running the “flutter create app_name” command or start a brand new project from Android Studio, we end up with a boilerplate code for a counter app like this:

Flutter Counter App Boilerplate Code

Running this project you will get this:

Flutter counter app

So, the question is, how can we create an empty Flutter project? In this article, you will learn two ways to start an empty Flutter project without the boilerplate code from the counter app.

Before we get started, make sure you have already installed the Flutter SDK so we can smoothly proceed with the project. If you haven’t installed it yet, see the Get Started with Flutter” guide on the official website

Let’s get started

Using Terminal

Open VSCode or Android Studio terminal, or use your Mac terminal or Windows command line.

  1. Navigate to the desired location:

On Mac:

cd Desktop/DesiredLocation

On Windows:

cd C:\Users\<Username>\DesiredLocation

2. After navigating to the desired location, run this command:

flutter create -e your_app_name
new empty flutter project

That’s it! Your new empty Flutter project will be created at the desired location.

To target a specific platform and keep your new Flutter project clean of any boilerplate code, run this command:

flutter create -e your_app_name --platforms android,ios 
Flutter new project folder structure

To specify the organization name, you can also run this:

flutter create -e your_app_name --platforms android,ios --org “com.your_organization”

With this command, you will have a new empty Flutter project without the boilerplate counter app code.

Using Visual Studio Code

  1. Open VSCode, click “View” located at the top, and select “Command Palette”
view>command palette on vscode

2. Search for “Flutter” and select: “Flutter New Project”

command palette > Flutter New Project on vscode

3. Select the project template “Application (empty)”

Choose “Application (empty)”

4. Choose the folder location

5. Enter a project name

Enter project name on vscode

6. Click Enter

new empty flutter project

Running the project

flutter run
new flutter project without counter app

Your new empty Flutter project without the counter app’s boilerplate code will be created at your desired location with the given name.

Congratulations! With this comprehensive guide, you now have all the tools to kickstart your Flutter journey and create new empty Flutter projects effortlessly. You’ve learned how to navigate the process of creating empty Flutter projects, avoiding the boilerplate code that comes with a counter app.

I hope you enjoyed this article and found it valuable in your Flutter development endeavors. If you’d like to stay updated with more insightful articles like this, feel free to follow me. I’m excited to share more tips, tricks, and in-depth tutorials to help you become a proficient Flutter developer.

Remember, practice makes perfect, so keep exploring and building amazing apps with Flutter. Happy coding!

--

--

Isaias Cuvula
Isaias Cuvula

Written by Isaias Cuvula

Flutter Developer & Content Creator

Responses (2)